mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Enforce commas in tuple syntax
This commit is contained in:
committed by
Alex Beregszaszi
parent
5b26e2bcee
commit
a8c047f48d
@@ -1187,6 +1187,18 @@ BOOST_AUTO_TEST_CASE(tuples)
|
||||
BOOST_CHECK(successParse(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(tuples_without_commas)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract C {
|
||||
function f() {
|
||||
var a = (2 2);
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_PARSE_ERROR(text, "Expected token Comma");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(member_access_parser_ambiguity)
|
||||
{
|
||||
char const* text = R"(
|
||||
|
||||
Reference in New Issue
Block a user