solidity/test/libsolidity/semanticTests/structs/nested_struct_allocation.sol
2022-05-19 20:23:28 +02:00

19 lines
226 B
Solidity

contract C {
struct I {
uint b;
uint c;
}
struct S {
I a;
}
function f() external returns (uint) {
S memory s = S(I(1,2));
return s.a.b;
}
}
// ====
// compileToEwasm: also
// ----
// f() -> 1