You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mypyc] Fix evaluation of iterable in list comprehension twice (#10599)
This could result in a crash if the second evaluation results
in a shorter list, such as in this example (besides being incorrect
overall):
```
a = [s for s in f.readlines()]
```
`f.readlines()` was called twice, resulting in an empty list on
the second call. This caused the list object constructed in the
comprehension to have a NULL item, which is invalid.
This fixes `mypy --install-types` in compiled mode.
Fixes#10596.
0 commit comments