From 82f5763e7afa498f891e9d41b30278c4482ddb8b Mon Sep 17 00:00:00 2001 From: Anurag Dashputre Date: Sat, 1 Dec 2018 22:50:56 +0530 Subject: Fix internal compiler error for unimplemented base contract function. --- .../libsolidity/syntaxTests/unimplemented_super_function.sol | 8 ++++++++ .../syntaxTests/unimplemented_super_function_derived.sol | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/libsolidity/syntaxTests/unimplemented_super_function.sol create mode 100644 test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol (limited to 'test') diff --git a/test/libsolidity/syntaxTests/unimplemented_super_function.sol b/test/libsolidity/syntaxTests/unimplemented_super_function.sol new file mode 100644 index 00000000..356727ae --- /dev/null +++ b/test/libsolidity/syntaxTests/unimplemented_super_function.sol @@ -0,0 +1,8 @@ +contract a { + function f() public; +} +contract b is a { + function f() public { super.f(); } +} +// ---- +// TypeError: (84-91): Member "f" not found or not visible after argument-dependent lookup in contract super b. diff --git a/test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol b/test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol new file mode 100644 index 00000000..88acbdf0 --- /dev/null +++ b/test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol @@ -0,0 +1,12 @@ +contract a { + function f() public; +} +contract b is a { + function f() public { super.f(); } +} +contract c is a,b { + // No error here. + function f() public { super.f(); } +} +// ---- +// TypeError: (84-91): Member "f" not found or not visible after argument-dependent lookup in contract super b. -- cgit v1.2.3