-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Strict comparison using === between NAN and NAN will always evaluate to false #10297
Comments
I think the underlying issue is simply this: https://phpstan.org/r/5cff9af9-ecef-422d-8a7b-606e25c33b78 And must be fixed in ConstantFloatType in accepts and isSuperTypeOf methods. |
Isn't this behaviour correct, as |
@ondrejmirtes @LeoVie After the latest push in 1.11.x, PHPStan now reports different result with your code snippet: @@ @@
+7: Expression "\NAN === \NAN" on a separate line does not do anything.
7: Strict comparison using === between NAN and NAN will always evaluate to false. Full report
|
Fixed phpstan/phpstan-src#3036 |
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. |
Bug report
Hello there!
I've just upgraded to the latest and greatest version of PHPStan (1.10.50) and this issue appeared :
Code snippet that reproduces the problem
https://phpstan.org/r/8b7e5238-b4a6-46c9-9fc3-0ef7c3b2343e
Expected output
There should be no errors.
Did PHPStan help you today? Did it make you happy in any way?
It allowed me to fix quite a lot of wrong PHPDocs ! 💪 Thank you for this invaluable tool.
The text was updated successfully, but these errors were encountered: