aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-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 569530b9..0e69bfa8 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -952,6 +952,18 @@ BOOST_AUTO_TEST_CASE(multi_variable_declaration)
BOOST_CHECK_NO_THROW(parseText(text));
}
+BOOST_AUTO_TEST_CASE(multi_variable_declaration_invalid)
+{
+ char const* text = R"(
+ library Lib {
+ function f() {
+ var () = g();
+ }
+ }
+ )";
+ BOOST_CHECK_THROW(parseText(text), ParserError);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}