Closed
Description
While working on #3305 I discovered that "synthetic" types are not always properly processed in third pass (also there can be additional problems with them in fixup.py
). This leads to crashes like these:
from typing import List, NewType, NamedTuple
from mypy_extensions import TypedDict
NT = NewType('NT', List[int, str])
class NM(NamedTuple):
x: List[int, str]
class TD(TypedDict):
x: List[int, str]
# crashers: any of these crashes with "IndexError: list index out of range"
TD({'x': []})
NM(x=[])
NT([])