[red-knot] Incorrect error message when iterating over an object that has an __iter__
method that might not return an object with a __next__
method
#16272
Labels
bug
Something isn't working
diagnostics
Related to reporting of diagnostics.
red-knot
Multi-file analysis & type inference
Description
For this snippet:
We currently emit this diagnostic:
It's correct for us to emit a diagnostic here. However, this is an incorrect error message:
__iter__
here is definitely bound, but it returns an object that might not necessarily have a__next__
method.The text was updated successfully, but these errors were encountered: