You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When accessing an array of a fixed size with a counter variable that fits within that size, reportPossiblyNonexistentConstantArrayOffset is generating an error.
The reproduction link shows a test case for it, though doesn't error as I can't enable the config option.
The error it generates is:
Offset int<0, 3> might not exist on array{1, 2, 3, 4}.
Bug report
When accessing an array of a fixed size with a counter variable that fits within that size,
reportPossiblyNonexistentConstantArrayOffset
is generating an error.The reproduction link shows a test case for it, though doesn't error as I can't enable the config option.
The error it generates is:
Code snippet that reproduces the problem
https://phpstan.org/r/d2e841b0-7150-4e6c-8ffd-173f10583786
Expected output
No error should be reported.
Did PHPStan help you today? Did it make you happy in any way?
I am enjoying the updated Pro UI! The little progress bar down the bottom is amazing, especially if a change requires re-analysing a lot of files.
The text was updated successfully, but these errors were encountered: