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
mypy crashes on a recursive definition if --disallow-any-generics is enabled.
Here's a sample:
$ cat crash.py
from typing import NamedTuple
N = NamedTuple('N', [('x', N)])
n: N
$ mypy crash.py --disallow-any-generics --show-traceback > out.txt
crash.py:1: error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues version: 0.580-dev-51b4e0cb3726d03e2d17c8a0de4d56110e30c5e5
crash.py:1: : note: use --pdb to drop into pdb
mypy crashes on a recursive definition if
--disallow-any-generics
is enabled.Here's a sample:
The full stacktrace is here.
Error comes from mypy trying to collect all types of
N
incollect_any_types
and ends up stuck in a cycle. The crash was discovered in #4225.The text was updated successfully, but these errors were encountered: