mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Check that constructor does not have "returns" directive.
This commit is contained in:
parent
17c433e7c9
commit
a1f61684b0
@ -284,6 +284,15 @@ BOOST_AUTO_TEST_CASE(assignment_to_struct)
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(returns_in_constructor)
|
||||
{
|
||||
char const* text = "contract test {\n"
|
||||
" function test() returns (uint a) {\n"
|
||||
" }\n"
|
||||
"}\n";
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user