Adding test for conversion of struct from storage to mapping.

This commit is contained in:
Djordje Mijovic 2021-01-18 14:25:25 +01:00
parent 055c4b4d44
commit 4c0cb2d76f

View File

@ -0,0 +1,17 @@
contract C {
struct S {
uint a;
}
S s;
mapping (uint => S) m;
function f() external returns (bool) {
s.a = 12;
m[1] = s;
return m[1].a == 12;
}
}
// ====
// compileViaYul: also
// ----
// f() -> true