solidity/test/libsolidity/semanticTests/functionCall/conditional_with_arguments.sol
2020-07-23 14:55:32 +02:00

13 lines
302 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);
}
}
// ====
// compileViaYul: also
// ----
// f() -> 1