Disallow fallback function to return values.

This commit is contained in:
chriseth
2016-08-26 00:07:50 +02:00
parent f329d5e772
commit 21b6aa92ff
3 changed files with 14 additions and 1 deletions
@@ -1102,6 +1102,16 @@ BOOST_AUTO_TEST_CASE(fallback_function_with_arguments)
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
}
BOOST_AUTO_TEST_CASE(fallback_function_with_return_parameters)
{
char const* text = R"(
contract C {
function() returns (uint) { }
}
)";
BOOST_CHECK(expectError(text) == Error::Type::TypeError);
}
BOOST_AUTO_TEST_CASE(fallback_function_twice)
{
char const* text = R"(