solidity/test/libsolidity/semanticTests/abiEncoderV2/calldata_struct_simple.sol

20 lines
403 B
Solidity
Raw Normal View History

pragma experimental ABIEncoderV2;
contract C {
struct S { uint256 a; }
function f(S calldata s) external returns (bytes memory) {
return abi.encode(s);
}
function g(S calldata s) external returns (bytes memory) {
return this.f(s);
}
}
// ====
// compileViaYul: also
// EVMVersion: >homestead
// ----
// f((uint256)): 3 -> 32, 32, 3
// g((uint256)): 3 -> 32, 32, 3