solidity/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol

19 lines
277 B
Solidity
Raw Normal View History

contract A {
uint x;
2020-06-23 12:14:24 +00:00
constructor() {
x = 42;
}
function f() public returns(uint256) {
return x;
}
}
contract B is A {
uint public y = f();
}
// ====
// compileToEwasm: also
// compileViaYul: true
// ----
// constructor() ->
// y() -> 42