Skip to content

Crash on super call in function with type variable #2361

Closed
@ddfisher

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:

from typing import TypeVar

T = TypeVar('T', int, str)

class A:
    pass

class B(A):
    def __init__(self, arg):
        # type: (T) -> None
        super(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