Closed
Description
(Based on #3111)
This fails with Argument 1 to "__new__" of "object" has incompatible type C[T]; expected "object"
T = TypeVar('T')
class C(Generic[T]):
def __new__(cls, foo: T) -> 'C[T]':
obj = object.__new__(cls)
return obj
def set(self, x: T) -> None: pass
Edit: deleted my own incorrect interpretation.
Metadata
Metadata
Assignees
Labels
No labels