diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-27 17:08:14 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-03-02 18:51:13 +0800 |
commit | 03bc87031e0f4836a51dba1a8f4c101c903824f9 (patch) | |
tree | be56ada2c70beb413a3dfdbd1dd1f5db69a8eb04 /SolidityNameAndTypeResolution.cpp | |
parent | 285a376248018de08883c396b43f2cea90e9e53b (diff) | |
download | dexon-solidity-03bc87031e0f4836a51dba1a8f4c101c903824f9.tar.gz dexon-solidity-03bc87031e0f4836a51dba1a8f4c101c903824f9.tar.zst dexon-solidity-03bc87031e0f4836a51dba1a8f4c101c903824f9.zip |
VisibleInDerivedContracts() is now virtual()
- Plus an extra test for internal visibility in a base class variable
Diffstat (limited to 'SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | SolidityNameAndTypeResolution.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index 9db45b91..58cebaeb 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -436,7 +436,7 @@ BOOST_AUTO_TEST_CASE(inheritance_diamond_basic) function g() { f(); rootFunction(); } } )"; - BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text)); + BOOST_CHECK_NO_THROW(parseTextAndResolveNamesWithChecks(text)); } 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_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) { char const* text = R"( |