Browse Source

Function name clashing with Statevariable accessor test

cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
762aa2d0f3
  1. 12
      test/SolidityNameAndTypeResolution.cpp

12
test/SolidityNameAndTypeResolution.cpp

@ -650,6 +650,18 @@ BOOST_AUTO_TEST_CASE(state_variable_accessors)
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)
{
char const* text = "contract test {\n"

Loading…
Cancel
Save