solidity/test/libsolidity/semanticTests/viaYul/assign_tuple_from_function_call.sol

17 lines
344 B
Solidity

contract C {
function f() public pure returns (uint, uint, uint) {
return (1, 2, 3);
}
function g() public pure returns (uint a, uint b, uint c) {
(c, b, a) = f();
}
function h() public pure returns (uint a) {
(,,a) = f();
}
}
// ====
// compileViaYul: also
// ----
// g() -> 3, 2, 1
// h() -> 3