mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Crash fix, parseTypeName can return null.
This commit is contained in:
@@ -1602,6 +1602,18 @@ BOOST_AUTO_TEST_CASE(interface)
|
||||
BOOST_CHECK(successParse(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(newInvalidTypeName)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract C {
|
||||
function f() {
|
||||
new var;
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_PARSE_ERROR(text, "Expected explicit type name");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user