-
Notifications
You must be signed in to change notification settings - Fork 533
While loop-like fixes #4312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While loop-like fixes #4312
Conversation
This pull request has been marked as ready for review.
/cc @staabm no issue bot jackpots, merging to see if it finds something on real-world projects but probably not worth pursuing more 😊
this loop business is so complicated, I tried find more things but its really hard.
one case which errors is
https://phpstan.org/r/d883e978-f368-4bf4-afae-8683f7f5ebd3
but not sure whether its a bug or intentional
I think in the linked example the for loop never executes which is reported by Strict comparison using !== between array{} and array{} will always evaluate to false.
.
A closer example to the original one is https://phpstan.org/r/02d50b61-9e19-4826-a593-b08f44bd0a48 which behaves as expected.
I just realized most of the code works as it should (it doesn't merge scope from dead code) and I can revert most of the changes.
That's why there's no impact of the changes I made on open issues and real-world code.
No description provided.