aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityParser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index a39e0958..60ca03c9 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -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()
}