mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Yul: Implement memory struct allocation
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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
|
||||
Reference in New Issue
Block a user