Skip to content

Commit 3983381

Browse files
authored
Fix testLiteralMeets failure (#15659)
1 parent 3bf8521 commit 3983381

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test-data/unit/check-literal.test

+2-1
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,8 @@ def f5(x: Literal[1], y: Union[Literal[1], Literal[2]]) -> None: pass
17971797
def f6(x: Optional[Literal[1]], y: Optional[Literal[2]]) -> None: pass
17981798

17991799
reveal_type(unify(f1)) # N: Revealed type is "Literal[1]"
1800-
reveal_type(unify(f2)) # N: Revealed type is "<nothing>"
1800+
if object():
1801+
reveal_type(unify(f2)) # N: Revealed type is "<nothing>"
18011802
reveal_type(unify(f3)) # N: Revealed type is "Literal[1]"
18021803
reveal_type(unify(f4)) # N: Revealed type is "Literal[1]"
18031804
reveal_type(unify(f5)) # N: Revealed type is "Literal[1]"

0 commit comments

Comments
 (0)