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;
|
|
|
|
}
|
|
|
|
|
|
|
|
function f(S1 calldata s1, S2 calldata s2, S1 calldata s3)
|
|
|
|
external
|
|
|
|
pure
|
|
|
|
returns (uint256 a, uint256 b, uint256 c, uint256 d, uint256 e)
|
|
|
|
{
|
|
|
|
a = s1.a;
|
|
|
|
b = s1.b;
|
|
|
|
c = s2.a;
|
|
|
|
d = s3.a;
|
|
|
|
e = s3.b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-20 13:06:45 +00:00
|
|
|
// ====
|
2020-11-21 13:54:16 +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
|