solidity/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol
2020-06-15 07:57:33 -05:00

19 lines
284 B
Solidity

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