solidity/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_simple.sol
2020-11-10 16:37:29 +01:00

16 lines
375 B
Solidity

pragma experimental ABIEncoderV2;
contract C {
struct S { uint a; uint8 b; uint8 c; bytes2 d; }
function f(S memory s) public pure returns (uint a, uint b, uint c, uint d) {
a = s.a;
b = s.b;
c = s.c;
d = uint16(s.d);
}
}
// ====
// compileViaYul: also
// ----
// f((uint256,uint8,uint8,bytes2)): 1, 2, 3, "ab" -> 1, 2, 3, 0x6162