-
-
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
Can't check if Iterator is empty #10938
Labels
Comments
The typesystem cannot express anything like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Hey there, I'm working on ReactPHP and it seems we can't really check if an Iterator is empty or not. We could really use this for our Promise and Async component, happy about your insights on this.
Code snippet that reproduces the problem
https://phpstan.org/r/fac73ffc-131a-43d1-8cb7-b1a629374ac1
Expected output
I think PHPStan should detect that the Iterator is empty here.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan always makes me happy
The text was updated successfully, but these errors were encountered: