Fix an issue with a type var lookups
This commit is contained in:
1 parent
28a55386b6
commit
bf6974dabb
2 files changed
+14
-1
No files matched your search
@@ -305,3 +305,16 @@ from typing import Union as U
|
||||
def union4(x: U[int, str]):
|
||||
#? int() str()
|
||||
x
|
||||
|
||||
|
||||
TYPE_VAR = typing.TypeVar('TYPE_VAR')
|
||||
|
||||
|
||||
class WithTypeVar(typing.Generic[TYPE_VAR]):
|
||||
def lala(self) -> TYPE_VAR:
|
||||
...
|
||||
|
||||
|
||||
def maaan(p: WithTypeVar[int]):
|
||||
#? int()
|
||||
p.lala()
|
||||
Reference in new issue
Block a user