solidity/test/libsolidity/semanticTests/expressions/conditional_expression_tuples.sol

11 lines
209 B
Solidity
Raw Normal View History

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