mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
VisibleInDerivedContracts() is now virtual()
- Plus an extra test for internal visibility in a base class variable
This commit is contained in:
parent
285a376248
commit
03bc87031e
@ -436,7 +436,7 @@ BOOST_AUTO_TEST_CASE(inheritance_diamond_basic)
|
|||||||
function g() { f(); rootFunction(); }
|
function g() { f(); rootFunction(); }
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text));
|
BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(cyclic_inheritance)
|
BOOST_AUTO_TEST_CASE(cyclic_inheritance)
|
||||||
@ -732,6 +732,17 @@ BOOST_AUTO_TEST_CASE(base_class_state_variable_accessor)
|
|||||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(text));
|
BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(base_class_state_variable_internal_member)
|
||||||
|
{
|
||||||
|
char const* text = "contract Parent {\n"
|
||||||
|
" uint256 internal m_aMember;\n"
|
||||||
|
"}\n"
|
||||||
|
"contract Child is Parent{\n"
|
||||||
|
" function foo() returns (uint256) { return Parent.m_aMember; }\n"
|
||||||
|
"}\n";
|
||||||
|
BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(text));
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(fallback_function)
|
BOOST_AUTO_TEST_CASE(fallback_function)
|
||||||
{
|
{
|
||||||
char const* text = R"(
|
char const* text = R"(
|
||||||
|
Loading…
Reference in New Issue
Block a user