mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
disallow declaration of void type
https://www.pivotaltracker.com/n/projects/1189488/stories/86318578
This commit is contained in:
parent
969366f46b
commit
bd41622341
@ -904,6 +904,12 @@ BOOST_AUTO_TEST_CASE(invalid_parameter_names_in_named_args)
|
|||||||
BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError);
|
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()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user