Make sure Callable TypeVars are better identified, solves a part of #1413

This commit is contained in:
Dave Halter
2019-12-07 15:01:47 +01:00
parent 4bd7c2e627
commit ab8f0ba834
2 changed files with 20 additions and 0 deletions

View File

@@ -402,6 +402,15 @@ type_in_out2()
#? float()
type_in_out2(float)
def ma(a: typing.Callable[[str], TYPE_VARX]) -> typing.Callable[[str], TYPE_VARX]:
return a
def mf(s: str) -> int:
return int(s)
#? int()
ma(mf)('2')
# -------------------------
# TYPE_CHECKING
# -------------------------