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

10 lines
269 B
Solidity

contract Test {
function testFunc() external {
for (;;) {}
bytes storage b;
b[0] = 0x42;
}
}
// ----
// TypeError 3464: (83-84='b'): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.