solidity/test/libsolidity/constructor_inheritance_init_order_3.sol
Djordje Mijovic 2839a1b0bf [Sol->Yul] Documenting difference in initialization order in case of inheritance.
Co-authored-by: Leonardo <leo@ethereum.org>

Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
2020-12-04 16:32:56 +01:00

13 lines
193 B
Solidity

contract A {
uint public x;
constructor(uint) {}
function f() public { x = 4; }
}
contract B is A {
constructor() A(f()) {}
}
// ====
// compileViaYul: also
// ----
// x() -> 4