mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
AsmParser: disallow trailing commas in function call arguments.
This commit is contained in:
+1
-2
@@ -3,10 +3,9 @@ contract C {
|
||||
assembly {
|
||||
function f(a, b) {}
|
||||
f()
|
||||
f(1,)
|
||||
f(,1)
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError: (113-114): Literal, identifier or instruction expected.
|
||||
// ParserError: (101-102): Literal, identifier or instruction expected.
|
||||
@@ -0,0 +1,11 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
function f(a, b) {}
|
||||
f()
|
||||
f(1,)
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError: (103-104): Literal, identifier or instruction expected.
|
||||
@@ -0,0 +1,10 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
function f(a, b, c) {}
|
||||
f(1,,1)
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError: (96-97): Literal, identifier or instruction expected.
|
||||
Reference in New Issue
Block a user