solidity/test/libsolidity/semanticTests/structs/calldata/dynamically_encoded.sol

13 lines
296 B
Solidity
Raw Normal View History

2020-11-23 18:06:44 +00:00
pragma abicoder v2;
contract C {
struct S { uint256[] a; }
function f(S calldata s) external pure returns (uint256 a, uint256 b, uint256 c) {
return (s.a.length, s.a[0], s.a[1]);
}
}
2020-07-20 13:06:45 +00:00
// ====
// compileToEwasm: also
// ----
// f((uint256[])): 32, 32, 2, 42, 23 -> 2, 42, 23