Merge pull request #4378 from ethereum/noBaseWithoutArguments

[BREAKING] Disallow calling base constructors without arguments.
This commit is contained in:
Alex Beregszaszi
2018-08-01 13:18:37 +01:00
committed by GitHub
4 changed files with 18 additions and 18 deletions
@@ -1,4 +1,4 @@
contract A { constructor() public { } }
contract B is A { constructor() A public { } }
// ----
// Warning: (72-73): Modifier-style base constructor call without arguments.
// DeclarationError: (72-73): Modifier-style base constructor call without arguments.
@@ -0,0 +1,9 @@
// This generated an invalid warning on m1 in some compiler versions.
contract A {
constructor() m1 public { }
modifier m1 { _; }
}
contract B is A {
modifier m2 { _; }
constructor() A() m1 m2 public { }
}