Yul: Implement memory struct allocation

This commit is contained in:
Mathias Baumann
2020-07-02 16:37:20 +02:00
parent 3d602b3190
commit 50373ac1b0
11 changed files with 150 additions and 11 deletions
@@ -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