Skip to content

Commit

Permalink
Add unit test check-list-expr.
Browse files Browse the repository at this point in the history
  • Loading branch information
ay0503 committed Nov 28, 2024
1 parent fe3322a commit e5893cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test-data/unit/check-expressions.test
Original file line number Diff line number Diff line change
Expand Up @@ -2452,3 +2452,10 @@ x + T # E: Unsupported left operand type for + ("int")
T() # E: "TypeVar" not callable
[builtins fixtures/tuple.pyi]
[typing fixtures/typing-full.pyi]

[case testListComprehensionWithUnionTypeGenerator]
class A: pass
class B: pass
a = A()
b = B()
l3: list[A | B] = [x for x in [a, b]]

0 comments on commit e5893cf

Please sign in to comment.