solidity/test/libsolidity/semanticTests/functionCall/conditional_with_arguments.sol
2022-05-19 20:23:28 +02:00

13 lines
303 B
Solidity

contract C {
function g(int x, int y) public pure returns (int) { return x - y; }
function h(int y, int x) public pure returns (int) { return y - x; }
function f() public pure returns (int) {
return (false ? g : h)(2, 1);
}
}
// ====
// compileToEwasm: also
// ----
// f() -> 1