From a54fdc495f54bd16c329ca3f79d533d540cb9a3e Mon Sep 17 00:00:00 2001
From: chriseth <chris@ethereum.org>
Date: Fri, 16 Mar 2018 19:02:15 +0100
Subject: Fix: Treat empty base constructor argument list as not provided.

---
 .../inheritance/base_arguments_empty_parentheses.sol           |  6 ++++++
 .../syntaxTests/inheritance/too_few_base_arguments.sol         | 10 ++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol
 create mode 100644 test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol

(limited to 'test/libsolidity')

diff --git a/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol b/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol
new file mode 100644
index 00000000..76df0657
--- /dev/null
+++ b/test/libsolidity/syntaxTests/inheritance/base_arguments_empty_parentheses.sol
@@ -0,0 +1,6 @@
+contract Base {
+  function Base(uint) public {}
+}
+contract Derived is Base(2) { }
+contract Derived2 is Base(), Derived() { }
+contract Derived3 is Base, Derived {}
diff --git a/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol b/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol
new file mode 100644
index 00000000..82aba308
--- /dev/null
+++ b/test/libsolidity/syntaxTests/inheritance/too_few_base_arguments.sol
@@ -0,0 +1,10 @@
+contract Base {
+  function Base(uint, uint) public {}
+}
+contract Derived is Base(2) { }
+contract Derived2 is Base {
+  function Derived2() Base(2) public { }
+}
+// ----
+// TypeError: Wrong argument count for constructor call: 1 arguments given but expected 2.
+// TypeError: Wrong argument count for modifier invocation: 1 arguments given but expected 2.
-- 
cgit v1.2.3