Skip to content
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

Precision loss leads to error message about condition being "always true" #7111

Closed
greg0ire opened this issue Apr 26, 2022 · 1 comment · Fixed by phpstan/phpstan-src#1249

Comments

@greg0ire
Copy link

Bug report

I'm trying to use conditional return types, but my condition seems too complicated for PHPStan yet

Code snippet that reproduces the problem

https://phpstan.org/r/848de7f0-976d-48c2-ad2c-06aaadeb9e7a

Expected output

No errors

Did PHPStan help you today? Did it make you happy in any way?

The latest version seems to allow me to get rid of some redundant asserts 🙂

@greg0ire greg0ire changed the title Precision loss leads to error message Precision loss leads to error message about condition being "always true" Apr 26, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant