mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-08 09:15:14 +08:00
Implement new-style unions with TypeVars
This commit is contained in:
1 parent
8ba5b67622
commit
55e5f0cb92
2 files changed
+10
-1
No files matched your search
@@ -387,3 +387,11 @@ first(custom_partial2_unbound_instance)
|
||||
|
||||
#? str()
|
||||
values(custom_partial2_unbound_instance)[0]
|
||||
|
||||
def generic_func1(arg: T) -> int | str | T: pass
|
||||
def generic_func2(arg: T) -> Union[int, str, T]: pass
|
||||
|
||||
#? int() str() bytes()
|
||||
generic_func1(b"hello")
|
||||
#? int() str() bytes()
|
||||
generic_func2(b"hello")
|
||||
Reference in new issue
Block a user