aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests
diff options
context:
space:
mode:
authorAnurag Dashputre <anurag4u80@gmail.com>2018-12-02 01:20:56 +0800
committerchriseth <chris@ethereum.org>2018-12-03 19:25:31 +0800
commit82f5763e7afa498f891e9d41b30278c4482ddb8b (patch)
treeffe9d7a020cf8e5bb475d0a283d26d73569fc3e5 /test/libsolidity/syntaxTests
parent4b98946e5a6cbc477ca5c61ca0a0dc8c2d1b27ca (diff)
downloaddexon-solidity-82f5763e7afa498f891e9d41b30278c4482ddb8b.tar.gz
dexon-solidity-82f5763e7afa498f891e9d41b30278c4482ddb8b.tar.zst
dexon-solidity-82f5763e7afa498f891e9d41b30278c4482ddb8b.zip
Fix internal compiler error for unimplemented base contract function.
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r--test/libsolidity/syntaxTests/unimplemented_super_function.sol8
-rw-r--r--test/libsolidity/syntaxTests/unimplemented_super_function_derived.sol12
2 files changed, 20 insertions, 0 deletions
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.