Merge pull request #963 from guanqun/disallow-void-var

Disallow implicit declaration of void type.
This commit is contained in:
chriseth
2015-02-06 12:08:24 +01:00
+6
View File
@@ -904,6 +904,12 @@ BOOST_AUTO_TEST_CASE(invalid_parameter_names_in_named_args)
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError);
}
BOOST_AUTO_TEST_CASE(disallow_declaration_of_void_type)
{
char const* sourceCode = "contract c { function f() { var x = f(); } }";
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError);
}
BOOST_AUTO_TEST_SUITE_END()
}