Open
Description
The following code causes mypy to never terminate.
from typing import Annotated, TypeVar
T = TypeVar("T")
R = Annotated[T, ...]
A = R["A"]
It can be turned into a sample that causes a segmentation fault.
from typing import Annotated, TypeVar
T = TypeVar("T")
R = Annotated[T, ...]
A = list[R["A"]]
def f() -> A:
return []
- Mypy version used: 1.10.0
- Mypy command-line flags: none
- Mypy configuration options from
mypy.ini
(and other config files): none - Python version used: 3.12
- Operating system and version: Linux, Windows (on Windows it immediately exits with code 1)