solidity/test/libsolidity/syntaxTests/controlFlow/uninitializedAccess/assembly.sol
2022-04-01 23:41:18 -05:00

10 lines
315 B
Solidity

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