mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Function name clashing with Statevariable accessor test
This commit is contained in:
parent
59bf3e91e6
commit
18eeee536d
@ -650,6 +650,18 @@ BOOST_AUTO_TEST_CASE(state_variable_accessors)
|
|||||||
BOOST_CHECK(function.isConstant());
|
BOOST_CHECK(function.isConstant());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(function_clash_with_state_variable_accessor)
|
||||||
|
{
|
||||||
|
char const* text = "contract test {\n"
|
||||||
|
" function fun() {\n"
|
||||||
|
" uint64(2);\n"
|
||||||
|
" }\n"
|
||||||
|
"uint256 foo;\n"
|
||||||
|
" function foo() {}\n"
|
||||||
|
"}\n";
|
||||||
|
BOOST_CHECK_THROW(parseTextAndResolveNames(text), DeclarationError);
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(private_state_variable)
|
BOOST_AUTO_TEST_CASE(private_state_variable)
|
||||||
{
|
{
|
||||||
char const* text = "contract test {\n"
|
char const* text = "contract test {\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user