mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Error when using empty parenthesis for base class constructors that require arguments.
This commit is contained in:
@@ -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 {}
|
||||
Reference in New Issue
Block a user