diff options
author | chriseth <chris@ethereum.org> | 2016-10-24 17:45:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-24 17:45:54 +0800 |
commit | cb1fcaf6f65608d6528753f1a998c2cf9f67baab (patch) | |
tree | 27cb4241c115a893644d25a3f9ae8cf55a7c80a5 /test | |
parent | 84b43b91396a3d60da055d2957501f4690fcb5cc (diff) | |
parent | 31ffe01463619ae4bd5fb910b98572ebd9c1a13b (diff) | |
download | dexon-solidity-cb1fcaf6f65608d6528753f1a998c2cf9f67baab.tar dexon-solidity-cb1fcaf6f65608d6528753f1a998c2cf9f67baab.tar.gz dexon-solidity-cb1fcaf6f65608d6528753f1a998c2cf9f67baab.tar.bz2 dexon-solidity-cb1fcaf6f65608d6528753f1a998c2cf9f67baab.tar.lz dexon-solidity-cb1fcaf6f65608d6528753f1a998c2cf9f67baab.tar.xz dexon-solidity-cb1fcaf6f65608d6528753f1a998c2cf9f67baab.tar.zst dexon-solidity-cb1fcaf6f65608d6528753f1a998c2cf9f67baab.zip |
Merge pull request #1240 from ethereum/1151
ast: super contract type does not contain native members
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 74632860..f024c03e 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -854,6 +854,23 @@ BOOST_AUTO_TEST_CASE(implicit_base_to_derived_conversion) BOOST_CHECK(expectError(text) == Error::Type::TypeError); } +BOOST_AUTO_TEST_CASE(super_excludes_current_contract) +{ + char const* text = R"( + contract A { + function b() {} + } + + contract B is A { + function f() { + super.f(); + } + } + )"; + + BOOST_CHECK(expectError(text) == Error::Type::TypeError); +} + BOOST_AUTO_TEST_CASE(function_modifier_invocation) { char const* text = R"( |