Skip to content

Commit 2bcfac9

Browse files
committed
Add test case
1 parent 59d8550 commit 2bcfac9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

test-data/unit/exportjson.test

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,33 @@ literal_ann: Literal['x', 5, False]
223223
[builtins fixtures/tuple.pyi]
224224
[out]
225225
<not checked>
226+
227+
[case testExportDifferentNodes]
228+
import typing
229+
230+
from typing import overload, TypeVar
231+
from typing_extensions import TypeVarTuple, ParamSpec
232+
233+
@overload
234+
def f(x: int) -> int: ...
235+
@overload
236+
def f(x: str) -> str: ...
237+
def f(x: int | str) -> int | str: ...
238+
239+
T = TypeVar("T")
240+
241+
def deco(f: T) -> T:
242+
return f
243+
244+
@deco
245+
def foo(x: int) -> int: ...
246+
247+
X = int
248+
x: X = 2
249+
250+
Ts = TypeVarTuple("Ts")
251+
P = ParamSpec("P")
252+
253+
[builtins fixtures/tuple.pyi]
254+
[out]
255+
<not checked>

0 commit comments

Comments
 (0)