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

False positives with return in generators using yield from #3407

Closed
stof opened this issue Jun 8, 2020 · 3 comments
Closed

False positives with return in generators using yield from #3407

stof opened this issue Jun 8, 2020 · 3 comments

Comments

@stof
Copy link
Contributor

stof commented Jun 8, 2020

Bug report

When a generator method uses yield from rather than yield, it looks like it is not identified as a generator. The analyser complains about the usage of return; which does not return an iterable.

Code snippet that reproduces the problem

https://phpstan.org/r/d23f70ca-1525-4ba6-947c-f55187988a87

Expected output

No issue reported for the return; statement

@enumag
Copy link
Contributor

enumag commented Jun 8, 2020

Yup, just wanted to report this too. It's a new bug in PHPStan 0.12.26.

@ondrejmirtes
Copy link
Member

@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 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants