solidity/test/libsolidity/semanticTests/viaYul/conditional/conditional_tuple.sol
2020-02-13 17:02:15 -04:00

12 lines
228 B
Solidity

contract A {
function f(bool cond) public pure returns (uint, uint) {
(uint a, uint b) = cond ? (1, 2) : (3, 4);
return (a, b);
}
}
// ====
// compileViaYul: also
// ----
// f(bool): true -> 1, 2
// f(bool): false -> 3, 4