Open
Description
I think this should be valid:
from typing import Callable, NamedTuple
class Foo(NamedTuple):
x: int
def __call__(self) -> int:
return self.x
foo: Callable[[], int] = Foo(42)
but mypy fails with:
error: Incompatible types in assignment (expression has type "Foo", variable has type "Callable[[], int]")