[mypyc] Fix crash on double yielding Iterators (#21826)
Closes https://github.com/mypyc/mypyc/issues/1210 This fixes another issue I ran into while trying to use `mypyc` for `isort`. I am aware the contributing guidelines say new contributors are not encouraged to use LLMs but I hope this can get the same handling as https://github.com/python/mypy/pull/21785. I have tried to ensure this patch works as much as I can by: Testing locally with `pytest mypyc/test/test_run.py `. Tested that the test fails on `master` without the changes. Also tried to run CI on my local fork (https://github.com/DanielNoord/mypy/pull/2), which succeeded. As with the previous PR, feel free to push changes to the branch or cherry pick this into another branch. I just want to unblock `isort` :)
D
Daniël van Noord committed
ed90eafe48f0c21cb578a93f4ec2838c407707dd
Parent: 0221c80
Committed by GitHub <noreply@github.com>
on 8/10/2026, 2:27:46 PM