Closed
Description
With this little snippet of code:
from typing import *
class D(TypedDict): ...
class P(Protocol): ...
T = TypeVar('T', bound=P)
def foo(cls: Type[T]) -> T: ...
d:D = foo(D)
I have this error:
>mypy td.py
td.py:11: error: Incompatible types in assignment (expression has type "D", variable has type "D")
Found 1 error in 1 file (checked 1 source file)
It seems a wrong error - or at least the message is not meaningful