mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
18 lines
253 B
Solidity
18 lines
253 B
Solidity
contract A {
|
|
uint x;
|
|
constructor() {
|
|
x = 42;
|
|
}
|
|
function f() public returns(uint256) {
|
|
return x;
|
|
}
|
|
}
|
|
contract B is A {
|
|
uint public y = f();
|
|
}
|
|
// ====
|
|
// compileViaYul: true
|
|
// ----
|
|
// constructor() ->
|
|
// y() -> 42
|