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

14 lines
310 B
Solidity

contract C {
uint[] x;
function() external {
uint[] storage y = x;
assembly {
y_slot := 1
y_offset := 2
}
}
}
// ----
// TypeError: (114-120): Storage variables cannot be assigned to.
// TypeError: (138-146): Storage variables cannot be assigned to.