solidity/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_calldata.sol
2020-11-24 14:57:45 +01:00

19 lines
370 B
Solidity

pragma abicoder v2;
contract C {
struct S {
uint256 a;
uint256[] b;
}
function f(bytes calldata data) external pure returns (S memory) {
return abi.decode(data, (S));
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0xe0, 0x20, 0x21, 0x40, 0x3, 0xa, 0xb, 0xc -> 0x20, 0x21, 0x40, 0x3, 0xa, 0xb, 0xc