mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Move constructor argument override check to TypeChecker and reuse annotations in ContractCompiler.
This commit is contained in:
@@ -6,4 +6,4 @@ contract Derived is Base, Base1 {
|
||||
constructor(uint i) Base(i) public {}
|
||||
}
|
||||
// ----
|
||||
// Warning: Duplicated super constructor calls are deprecated.
|
||||
// Warning: Base constructor arguments given twice.
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ contract A { constructor(uint) public { } }
|
||||
contract B is A(2) { constructor() public { } }
|
||||
contract C is B { constructor() A(3) public { } }
|
||||
// ----
|
||||
// Warning: Duplicated super constructor calls are deprecated.
|
||||
// Warning: Base constructor arguments given twice.
|
||||
+1
-1
@@ -4,4 +4,4 @@ contract A { constructor(uint) public { } }
|
||||
contract B is A(2) { constructor() public { } }
|
||||
contract C is B { constructor() A(3) public { } }
|
||||
// ----
|
||||
// DeclarationError: Duplicated super constructor call.
|
||||
// DeclarationError: Base constructor arguments given twice.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
contract A { constructor(uint) public { } }
|
||||
contract B is A(2) { constructor() A(3) public { } }
|
||||
// ----
|
||||
// Warning: Duplicated super constructor calls are deprecated.
|
||||
// Warning: Base constructor arguments given twice.
|
||||
+1
-1
@@ -3,4 +3,4 @@ pragma experimental "v0.5.0";
|
||||
contract A { constructor(uint) public { } }
|
||||
contract B is A(2) { constructor() A(3) public { } }
|
||||
// ----
|
||||
// DeclarationError: Duplicated super constructor call.
|
||||
// DeclarationError: Base constructor arguments given twice.
|
||||
+2
-2
@@ -3,5 +3,5 @@ contract A is C(2) {}
|
||||
contract B is C(2) {}
|
||||
contract D is A, B { constructor() C(3) public {} }
|
||||
// ----
|
||||
// Warning: Duplicated super constructor calls are deprecated.
|
||||
// Warning: Duplicated super constructor calls are deprecated.
|
||||
// Warning: Base constructor arguments given twice.
|
||||
// Warning: Base constructor arguments given twice.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
contract C { constructor(uint) public {} }
|
||||
contract A is C(2) {}
|
||||
contract B is C(2) {}
|
||||
contract D is A, B {}
|
||||
// ----
|
||||
// Warning: Base constructor arguments given twice.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
contract C { constructor(uint) public {} }
|
||||
contract A is C { constructor() C(2) public {} }
|
||||
contract B is C { constructor() C(2) public {} }
|
||||
contract D is A, B { }
|
||||
// ----
|
||||
// Warning: Base constructor arguments given twice.
|
||||
Reference in New Issue
Block a user