Skip to content

Commit

Permalink
Fix testLiteralMeets failure (#15659)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst authored Jul 13, 2023
1 parent 3bf8521 commit 3983381
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test-data/unit/check-literal.test
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,8 @@ def f5(x: Literal[1], y: Union[Literal[1], Literal[2]]) -> None: pass
def f6(x: Optional[Literal[1]], y: Optional[Literal[2]]) -> None: pass

reveal_type(unify(f1)) # N: Revealed type is "Literal[1]"
reveal_type(unify(f2)) # N: Revealed type is "<nothing>"
if object():
reveal_type(unify(f2)) # N: Revealed type is "<nothing>"
reveal_type(unify(f3)) # N: Revealed type is "Literal[1]"
reveal_type(unify(f4)) # N: Revealed type is "Literal[1]"
reveal_type(unify(f5)) # N: Revealed type is "Literal[1]"
Expand Down

0 comments on commit 3983381

Please sign in to comment.