-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-0-hightopic-type-variables
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?
jSadoski and Fogapod
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-0-hightopic-type-variables