solidity/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_variables.sol

14 lines
244 B
Solidity
Raw Normal View History

2020-02-13 19:42:16 +00:00
contract A {
function f() public pure returns (uint, uint, uint, uint) {
uint x = 3;
uint y = 1;
uint z = (x > y) ? x : y;
uint w = x < y ? x : y;
return (x, y, z, w);
}
}
// ====
// compileViaYul: also
// ----
// f() -> 3, 1, 3, 1