solidity/test/libsolidity/syntaxTests/inlineAssembly/storage_reference.sol

12 lines
254 B
Solidity
Raw Normal View History

2018-06-27 23:42:46 +00:00
contract C {
uint[] x;
2018-06-28 20:45:53 +00:00
function() public {
2018-06-27 23:42:46 +00:00
uint[] storage y = x;
assembly {
pop(y)
}
}
}
// ----
2018-06-28 20:45:53 +00:00
// TypeError: (117-118): You have to use the _slot or _offset suffix to access storage reference variables.