mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #10805 from ethereum/structMappingTestCase
Adding test for conversion of struct from storage to mapping.
This commit is contained in:
commit
1ad1591617
@ -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
|
Loading…
Reference in New Issue
Block a user