mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use .slot and .offest to access storage items.
This commit is contained in:
@@ -2,7 +2,7 @@ contract C {
|
||||
struct S { uint x; }
|
||||
S s;
|
||||
function e() pure public {
|
||||
assembly { mstore(keccak256(0, 20), mul(s_slot, 2)) }
|
||||
assembly { mstore(keccak256(0, 20), mul(s.slot, 2)) }
|
||||
}
|
||||
function f() pure public {
|
||||
uint x;
|
||||
|
||||
Reference in New Issue
Block a user