From 46982ce42bd7abd3a0d83fd1241b8d295bd0e711 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 9 Dec 2019 00:26:18 +0100 Subject: [PATCH] Add a test to show that type var inference also works for tuples --- test/completion/pep0484_typing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/completion/pep0484_typing.py b/test/completion/pep0484_typing.py index 72573e98..ba8299ee 100644 --- a/test/completion/pep0484_typing.py +++ b/test/completion/pep0484_typing.py @@ -411,6 +411,15 @@ def mf(s: str) -> int: #? int() ma(mf)('2') +def xxx(x: typing.Iterable[TYPE_VARX]) -> typing.Tuple[str, TYPE_VARX]: ... + +#? str() +xxx([0])[0] +#? int() +xxx([0])[1] +#? +xxx([0])[2] + # ------------------------- # TYPE_CHECKING # -------------------------