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

18 lines
257 B
Solidity
Raw Normal View History

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