Skip to content

Crash on super call in function with type variable #2361

Description

@ddfisher

#2193 causes a crash when calling super in function which takes a generic argument (even if the generic argument is unused). Here's the minimum reproducer I've found:

fromtypingimportTypeVarT=TypeVar('T', int, str)
classA:
passclassB(A):
def__init__(self, arg):
# type: (T) -> Nonesuper(B, self).__init__()

@JukkaL@elazarg could you take a look?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions