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

18 lines
447 B
Solidity

pragma abicoder v2;
contract C {
struct S { function () external returns (uint) f; uint b; }
function f(S memory s) public returns (uint, uint) {
return (s.f(), s.b);
}
function test() public returns (uint, uint) {
return this.f(S(this.g, 3));
}
function g() public returns (uint) { return 7; }
}
// ====
// requiresYulOptimizer: minimalStack
// compileViaYul: also
// ----
// test() -> 7, 3