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

Check TSend type when iterating over a generator #10589

Open
weirdan opened this issue Feb 16, 2024 · 0 comments
Open

Check TSend type when iterating over a generator #10589

weirdan opened this issue Feb 16, 2024 · 0 comments

Comments

@weirdan
Copy link

weirdan commented Feb 16, 2024

Feature request

Currently, PHPStan fails to prevent (very much preventable) fatal error:

https://3v4l.org/ONh6K

https://phpstan.org/r/067c8fd9-170f-4662-8818-a85a6cc277a5

It would be nice if it could catch it.

Also, see vimeo/psalm#10697 for the proposed implementation of this in Psalm.

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

Not a PHPStan user myself, but happy that it exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants