solidity/test/libsolidity/semanticTests/structs/calldata/calldata_struct_and_ints.sol
2020-03-19 14:42:25 +01:00

21 lines
365 B
Solidity

pragma experimental ABIEncoderV2;
contract C {
struct S {
uint256 a;
uint256 b;
}
function f(uint256 a, S calldata s, uint256 b)
external
pure
returns (uint256, uint256, uint256, uint256)
{
return (a, s.a, s.b, b);
}
}
// ----
// f(uint256,(uint256,uint256),uint256): 1, 2, 3, 4 -> 1, 2, 3, 4