mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add passing test case
This commit is contained in:
parent
d62476fb1f
commit
3cad417710
@ -1,6 +1,6 @@
|
|||||||
contract C {
|
contract C {
|
||||||
uint[] x;
|
uint[] x;
|
||||||
function() {
|
function() public {
|
||||||
uint[] storage y = x;
|
uint[] storage y = x;
|
||||||
assembly {
|
assembly {
|
||||||
pop(y)
|
pop(y)
|
||||||
@ -8,4 +8,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (110-111): You have to use the _slot or _offset suffix to access storage reference variables.
|
// TypeError: (117-118): You have to use the _slot or _offset suffix to access storage reference variables.
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
contract C {
|
||||||
|
uint[] x;
|
||||||
|
function() public {
|
||||||
|
uint[] storage y = x;
|
||||||
|
assembly {
|
||||||
|
pop(y_slot)
|
||||||
|
pop(y_offset)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
Loading…
Reference in New Issue
Block a user