2020-11-23 18:06:44 +00:00
|
|
|
pragma abicoder v2;
|
2020-03-09 21:14:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
contract C {
|
|
|
|
struct S1 {
|
|
|
|
uint256 a;
|
|
|
|
uint256 b;
|
|
|
|
}
|
|
|
|
struct S2 {
|
|
|
|
uint256 a;
|
|
|
|
uint256 b;
|
|
|
|
S1 s;
|
|
|
|
uint256 c;
|
|
|
|
}
|
|
|
|
|
|
|
|
function f(S2 calldata s)
|
|
|
|
external
|
|
|
|
pure
|
|
|
|
returns (uint256 a, uint256 b, uint256 sa, uint256 sb, uint256 c)
|
|
|
|
{
|
|
|
|
return (s.a, s.b, s.s.a, s.s.b, s.c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-26 10:18:01 +00:00
|
|
|
// ====
|
2020-11-21 20:05:39 +00:00
|
|
|
// compileToEwasm: also
|
2021-03-12 23:02:36 +00:00
|
|
|
// compileViaYul: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
|
|
|
// f((uint256,uint256,(uint256,uint256),uint256)): 1, 2, 3, 4, 5 -> 1, 2, 3, 4, 5
|