Fix missing error when accessing unintialized variables.

This commit is contained in:
Mathias Baumann
2021-01-25 14:44:15 +01:00
parent ccdf57c9b1
commit 07a1d230cd
7 changed files with 61 additions and 1 deletions
@@ -0,0 +1,9 @@
contract Test {
function testFunc() external {
while (true) {}
bytes storage b;
b[0] = 0x42;
}
}
// ----
// TypeError 3464: (87-88): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.