mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
19 lines
333 B
Solidity
19 lines
333 B
Solidity
contract C {
|
|
uint256[] public a;
|
|
|
|
function f() public returns (uint256) {
|
|
uint256[] storage x = a;
|
|
uint256 off;
|
|
assembly {
|
|
sstore(x.slot, 7)
|
|
off := x.offset
|
|
}
|
|
assert(off == 0);
|
|
return a.length;
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// f() -> 7
|