solidity/test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/assembly.sol
2020-03-09 16:23:10 +01:00

10 lines
301 B
Solidity

contract C {
uint[] r;
function f() internal view returns (uint[] storage s) {
assembly { pop(s_slot) }
s = r;
}
}
// ----
// TypeError: (107-113): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.