NoReturn should be assignable to any type #2921
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Discussed in #2920
Originally posted by JelleZijlstra January 22, 2022
I was exploring pyright's treatment of NoReturn (in preparation for adding and documenting typing.Never) and noticed that pyright allows passing NoReturn to parameters of type
object
. For example, this typechecks:Is this an intentional behavior? It's not what I expected on first principles but it seems useful in practice.
The text was updated successfully, but these errors were encountered: