Fix: Treat empty base constructor argument list as not provided.

This commit is contained in:
chriseth
2018-04-03 14:53:48 +02:00
parent d21382157c
commit a54fdc495f
4 changed files with 22 additions and 3 deletions
@@ -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 {}
@@ -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.