Closed
Description
Since #5699, mypy now rejects the following program (minimized from a few failures at dropbox):
from typing import TypeVar, Callable, Tuple
T = TypeVar('T')
def f(x: Callable[..., T]) -> T:
return x()
x: Tuple[str, ...] = f(tuple)
with the error message
Incompatible types in assignment (expression has type "Tuple[_T_co, ...]", variable has type "Tuple[str, ...]")
@ilevkivskyi thoughts?
To be honest I'm not totally sure how we used to get this right, since my understanding was that we don't do the sort of instantiation of all type variables and unification that I would expect to be necessary?