mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
22 lines
367 B
Solidity
22 lines
367 B
Solidity
|
contract D {
|
||
|
uint public x;
|
||
|
constructor(function() external pure returns (uint) g) {
|
||
|
x = g();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
contract C {
|
||
|
function f() public returns (uint r) {
|
||
|
D d = new D(this.sixteen);
|
||
|
r = d.x();
|
||
|
}
|
||
|
|
||
|
function sixteen() public pure returns (uint) {
|
||
|
return 16;
|
||
|
}
|
||
|
}
|
||
|
// ====
|
||
|
// compileViaYul: also
|
||
|
// ----
|
||
|
// f() -> 16
|