solidity/test/libsolidity/semanticTests/structs/nested_struct_allocation.sol

19 lines
225 B
Solidity
Raw Normal View History

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;
}
}
// ====
// compileViaYul: also
// ----
// f() -> 1