solidity/test/libsolidity/semanticTests/functionCall/named_args.sol
2023-05-11 10:56:55 -05:00

9 lines
295 B
Solidity

contract test {
function a(uint a, uint b, uint c) public returns (uint r) { r = a * 100 + b * 10 + c * 1; }
function b() public returns (uint r) { r = a({a: 1, b: 2, c: 3}); }
function c() public returns (uint r) { r = a({b: 2, c: 3, a: 1}); }
}
// ----
// b() -> 123
// c() -> 123