Merge pull request #10945 from ethereum/constructor-modifier-bugfix

Fix IR bug about calling the wrong modifier during construction
This commit is contained in:
Harikrishnan Mulackal
2021-02-10 21:42:45 +01:00
committed by GitHub
3 changed files with 21 additions and 1 deletions
@@ -0,0 +1,7 @@
// The IR of this contract used to throw
contract A { modifier m1{_;} }
contract B is A { constructor() A() m1{} }
// ====
// compileViaYul: also
// ----
// constructor() ->
@@ -0,0 +1,13 @@
// The IR of this contract used to throw
contract A {
constructor() m1 { }
modifier m1 { _; }
}
contract B is A {
modifier m2 { _; }
constructor() A() m1 m2 { }
}
// ====
// compileViaYul: also
// ----
// constructor() ->