We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Variable defined in if or expr is always defined, but reported as undefined.
https://phpstan.org/r/2f2a7985-770e-475f-b7b9-e1baee21eb09
no error
The text was updated successfully, but these errors were encountered:
@mvorisek After the latest commit in dev-master, PHPStan now reports different result with your code snippet:
@@ @@ -17: Variable $w might not be defined. +No errors
Sorry, something went wrong.
Fixed: phpstan/phpstan-src@cc6655f
Regression tests
86fd620
Closes phpstan/phpstan#5893 Closes phpstan/phpstan#6070 Closes phpstan/phpstan#5869 Closes phpstan/phpstan#6212 Closes phpstan/phpstan#6262 Closes phpstan/phpstan#6266 Closes phpstan/phpstan#6023 Closes phpstan/phpstan#6108 Closes phpstan/phpstan#6020 Closes phpstan/phpstan#1746 Closes phpstan/phpstan#1516 Closes phpstan/phpstan#6174 Closes phpstan/phpstan#6112 Closes phpstan/phpstan#5749 Closes phpstan/phpstan#5969 Closes phpstan/phpstan#5295 Closes phpstan/phpstan#5675 Closes phpstan/phpstan#5369 Closes phpstan/phpstan#6699 Closes phpstan/phpstan#6505
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Bug report
Variable defined in if or expr is always defined, but reported as undefined.
Code snippet that reproduces the problem
https://phpstan.org/r/2f2a7985-770e-475f-b7b9-e1baee21eb09
Expected output
no error
The text was updated successfully, but these errors were encountered: