diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2016-10-18 18:42:35 +0800 |
---|---|---|
committer | Yoichi Hirai <i@yoichihirai.com> | 2016-10-20 22:09:52 +0800 |
commit | 6781ec105f43bb98fd165c4ba86c76ebc1fb9587 (patch) | |
tree | ad8535d85f8ab55795f3de4fa032827247c815ab /test | |
parent | 9d30450167d5b262d0e7379f44f01637715fb878 (diff) | |
download | dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.tar dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.tar.gz dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.tar.bz2 dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.tar.lz dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.tar.xz dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.tar.zst dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.zip |
Add a test for #1151
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 7eedbefa..35d09d23 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"( |