Iterator evaluators (e.g. any
) don't erase types when in conjunction with Never
functions
#15703
Labels
bug
mypy got something wrong
Bug Report
Functions that evaluate iterators (like
any
) don't disqualify a value from being of another type if there's a function that never returns (likesys.exit
).To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=bf0b47681fdf97d19050eff3473d03f6
Actual Behavior
Your Environment
mypy.ini
(and other config files): defaultsThe text was updated successfully, but these errors were encountered: