solidity/test/libsolidity/syntaxTests/inlineAssembly/storage_reference_on_memory.sol
2018-08-01 21:57:12 +02:00

14 lines
367 B
Solidity

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.