Error when using empty parenthesis for base class constructors that require arguments.

This commit is contained in:
Daniel Kirchner
2018-04-05 11:52:22 +02:00
parent c63efebd45
commit 96eff0ff6a
10 changed files with 73 additions and 36 deletions
@@ -3,4 +3,5 @@ contract Base {
}
contract Derived is Base(2) { }
contract Derived2 is Base(), Derived() { }
contract Derived3 is Base, Derived {}
// ----
// Warning: Wrong argument count for constructor call: 0 arguments given but expected 1.
@@ -0,0 +1,9 @@
pragma experimental "v0.5.0";
contract Base {
constructor(uint) public {}
}
contract Derived is Base(2) { }
contract Derived2 is Base(), Derived() { }
// ----
// TypeError: Wrong argument count for constructor call: 0 arguments given but expected 1.
@@ -0,0 +1,5 @@
contract Base {
constructor(uint) public {}
}
contract Derived is Base(2) { }
contract Derived2 is Base, Derived {}