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
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:
fromtypingimportList, NewType, NamedTuplefrommypy_extensionsimportTypedDictNT=NewType('NT', List[int, str])
classNM(NamedTuple):
x: List[int, str]
classTD(TypedDict):
x: List[int, str]
# crashers: any of these crashes with "IndexError: list index out of range"TD({'x': []})
NM(x=[])
NT([])
The text was updated successfully, but these errors were encountered:
Fixes#3308
This PR adds better processing of "synthetic" types (``NewType``, ``NamedTuple``, ``TypedDict``) to the third pass and moves some processing from the second to the third pass.
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:The text was updated successfully, but these errors were encountered: