aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-10-18 18:42:35 +0800
committerYoichi Hirai <i@yoichihirai.com>2016-10-20 22:09:52 +0800
commit6781ec105f43bb98fd165c4ba86c76ebc1fb9587 (patch)
treead8535d85f8ab55795f3de4fa032827247c815ab /test/libsolidity
parent9d30450167d5b262d0e7379f44f01637715fb878 (diff)
downloaddexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.tar.gz
dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.tar.zst
dexon-solidity-6781ec105f43bb98fd165c4ba86c76ebc1fb9587.zip
Add a test for #1151
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp17
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"(