Crash fix, parseTypeName can return null.

This commit is contained in:
chriseth
2017-08-28 15:13:02 +02:00
parent d15cde2aa8
commit 122e65f8f4
3 changed files with 18 additions and 1 deletions
+12
View File
@@ -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()
}