solidity/test/libsolidity/semanticTests/structs/calldata/dynamically_encoded.sol
Daniel Kirchner a8f7c69c47 Adjust tests.
2021-09-13 20:41:40 +02:00

15 lines
357 B
Solidity

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]);
}
}
// ====
// requiresYulOptimizer: minimalStack
// compileToEwasm: also
// compileViaYul: also
// ----
// f((uint256[])): 32, 32, 2, 42, 23 -> 2, 42, 23