solidity/test/libsolidity/semanticTests/functionCall/conditional_with_arguments.sol

13 lines
302 B
Solidity
Raw Normal View History

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);
}
}
2020-07-17 08:22:30 +00:00
// ====
// compileViaYul: also
// ----
// f() -> 1