solidity/test/libsolidity/semanticTests/viaYul/conditional/conditional_tuple.sol
2022-05-19 20:23:28 +02:00

12 lines
229 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);
}
}
// ====
// compileToEwasm: also
// ----
// f(bool): true -> 1, 2
// f(bool): false -> 3, 4