Skip to content

Commit 9e9279d

Browse files
committed
Add unit test check-list-expr.
1 parent 85e4aa8 commit 9e9279d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test-data/unit/check-expressions.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,3 +2452,10 @@ x + T # E: Unsupported left operand type for + ("int")
24522452
T() # E: "TypeVar" not callable
24532453
[builtins fixtures/tuple.pyi]
24542454
[typing fixtures/typing-full.pyi]
2455+
2456+
[case testListComprehensionWithUnionTypeGenerator]
2457+
class A: pass
2458+
class B: pass
2459+
a = A()
2460+
b = B()
2461+
l3: list[A | B] = [x for x in [a, b]]

0 commit comments

Comments
 (0)