solidity/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol
2021-11-15 16:32:45 +01:00

20 lines
304 B
Solidity

contract A {
uint x;
constructor() {
x = 42;
}
function f() public returns(uint256) {
return x;
}
}
contract B is A {
uint public y = f();
}
// ====
// compileToEwasm: also
// compileViaYul: true
// ----
// constructor() ->
// gas irOptimized: 122233
// y() -> 42