mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
13 lines
252 B
Solidity
13 lines
252 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
|
|
// compileToEwasm: also
|
|
// ----
|
|
// f(bool): true -> 1, 2
|
|
// f(bool): false -> 3, 4
|