mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix internal compiler error when parsing `var` declaration without identifier.
This commit is contained in:
@@ -557,16 +557,6 @@ BOOST_AUTO_TEST_CASE(variable_definition_with_initialization)
|
||||
BOOST_CHECK(successParse(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(variable_definition_in_function_parameter)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
function fun(var a) {}
|
||||
}
|
||||
)";
|
||||
CHECK_PARSE_ERROR(text, "Expected explicit type name");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(variable_definition_in_mapping)
|
||||
{
|
||||
char const* text = R"(
|
||||
@@ -579,18 +569,6 @@ BOOST_AUTO_TEST_CASE(variable_definition_in_mapping)
|
||||
CHECK_PARSE_ERROR(text, "Expected elementary type name for mapping key type");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(variable_definition_in_function_return)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
function fun() returns(var d) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_PARSE_ERROR(text, "Expected explicit type name");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(operator_expression)
|
||||
{
|
||||
char const* text = R"(
|
||||
|
||||
Reference in New Issue
Block a user