Skip to content

Commit 57cf1e6

Browse files
author
Guido van Rossum
committed
Add a few more tests (enabled by the f(*args, expr) fix).
1 parent c25cfd5 commit 57cf1e6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

test-data/unit/check-lists.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,6 @@ a = [1, *[2, 3]]
6969
reveal_type(a) # E: Revealed type is 'builtins.list[builtins.int]'
7070
b = [0, *a]
7171
reveal_type(b) # E: Revealed type is 'builtins.list[builtins.int*]'
72+
c = [*a, 0]
73+
reveal_type(c) # E: Revealed type is 'builtins.list[builtins.int*]'
7274
[builtins fixtures/list.py]

test-data/unit/check-tuples.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,8 @@ reveal_type(b) # E: Revealed type is 'builtins.tuple[builtins.int*]'
785785
a = ['']
786786
b = (0, *a)
787787
reveal_type(b) # E: Revealed type is 'builtins.tuple[builtins.object*]'
788+
c = (*a, '')
789+
reveal_type(c) # E: Revealed type is 'builtins.tuple[builtins.str*]'
788790
[builtins fixtures/tuple.py]
789791

790792
[case testTupleWithStarExpr4]

0 commit comments

Comments
 (0)