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

14 lines
367 B
Solidity
Raw Normal View History

contract C {
uint[] x;
function() external {
uint[] memory y = x;
assembly {
pop(y_slot)
pop(y_offset)
}
}
}
// ----
// TypeError: (117-123): The suffixes _offset and _slot can only be used on storage variables.
// TypeError: (141-149): The suffixes _offset and _slot can only be used on storage variables.