solidity/test/libsolidity/semanticTests/constructor/constructor_function_complex.sol
Daniel Kirchner a8f7c69c47 Adjust tests.
2021-09-13 20:41:40 +02:00

24 lines
427 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;
}
}
// ====
// requiresYulOptimizer: minimalStack
// compileViaYul: also
// ----
// f() -> 16
// gas legacy: 103744