Skip to content

Commit 93fe7f6

Browse files
committed
Check join is symmetric
1 parent 8f05e48 commit 93fe7f6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test-data/unit/check-typevar-tuple.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,8 +2594,11 @@ def join(x: T, y: T) -> T: ...
25942594
def test(xs: tuple[Unpack[Ts]], xsi: tuple[int, Unpack[Ts]]) -> None:
25952595
a: tuple[Any, ...]
25962596
reveal_type(join(xs, a)) # N: Revealed type is "builtins.tuple[Any, ...]"
2597+
reveal_type(join(a, xs)) # N: Revealed type is "builtins.tuple[Any, ...]"
25972598
aa: tuple[Unpack[tuple[Any, ...]]]
25982599
reveal_type(join(xs, aa)) # N: Revealed type is "builtins.tuple[Any, ...]"
2600+
reveal_type(join(aa, xs)) # N: Revealed type is "builtins.tuple[Any, ...]"
25992601
ai: tuple[int, Unpack[tuple[Any, ...]]]
26002602
reveal_type(join(xsi, ai)) # N: Revealed type is "Tuple[builtins.int, Unpack[builtins.tuple[Any, ...]]]"
2603+
reveal_type(join(ai, xsi)) # N: Revealed type is "Tuple[builtins.int, Unpack[builtins.tuple[Any, ...]]]"
26012604
[builtins fixtures/tuple.pyi]

0 commit comments

Comments
 (0)