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

12 lines
256 B
Solidity
Raw Normal View History

2018-06-27 23:42:46 +00:00
contract C {
uint[] x;
2018-06-28 16:09:27 +00:00
function() external {
2018-06-27 23:42:46 +00:00
uint[] storage y = x;
assembly {
pop(y)
}
}
}
// ----
2018-06-28 16:09:27 +00:00
// TypeError: (119-120): You have to use the _slot or _offset suffix to access storage reference variables.