-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Exception catch scope infers incorrect types #1670
Comments
@ondrejmirtes this seems to have been fixed with: 00c781c |
Hi, that's weird. This area definitely hasn't been implemented yet. PHPStan does not understand when are exceptions in try |
@cs278 PHPStan now reports different result with your code snippet: @@ @@
-13: Strict comparison using === between stdClass and null will always evaluate to false.
+No errors |
I have no idea why this isn't reported by the playground, but locally it's still just |
Fixed by: phpstan/phpstan-src#481 |
Closes phpstan/phpstan#1597 Closes phpstan/phpstan#3617 Closes phpstan/phpstan#778 Closes phpstan/phpstan#2969 Closes phpstan/phpstan#3004 Closes phpstan/phpstan#3710 Closes phpstan/phpstan#3822 Closes phpstan/phpstan#505 Closes phpstan/phpstan#1670 Closes phpstan/phpstan#1219
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. |
Summary of a problem or a feature request
Exception catch scope infers incorrect types. Apologies this isn't easy to describe and I didn't have any luck finding a similar issue. The code below is a minimum reproducer of the problem.
Code snippet that reproduces the problem
https://phpstan.org/r/c56d3540-d5fa-4366-8ca8-fb6bb63d2484
Expected output
No error
The text was updated successfully, but these errors were encountered: