[red-knot] Fix bug where union of two iterable types was not recognised as iterable#13992
[red-knot] Fix bug where union of two iterable types was not recognised as iterable#13992AlexWaygood merged 3 commits intomainfrom
Conversation
cf8a4c4 to
5ce65e3
Compare
5ce65e3 to
ccc63b1
Compare
|
MichaReiser
left a comment
There was a problem hiding this comment.
It would be nice to also have a test where one type is iterable and the other is not. E.g. iterator over str | int.
This should work as expected today but I think the fix you pushed now would have regressed the diagnostic precision when our errors distinguish between a non-iterable and an iterator missing the __next__ method.
in fact, it does not... great catch! |
Should we capture this in an issue? |
I am working on a fix. But if I do not succeed in putting up the fix, I will write up an issue. |
I did not succeed in putting up the fix! Here is the issue instead: #14012 |
Fixes #13990. My favourite kind of bugfix: more accuracy for less code!