From 39833810ddcd29561f3ffed44703380aa26a68be Mon Sep 17 00:00:00 2001 From: Ilya Priven Date: Thu, 13 Jul 2023 12:27:28 -0700 Subject: [PATCH] Fix testLiteralMeets failure (#15659) --- test-data/unit/check-literal.test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test-data/unit/check-literal.test b/test-data/unit/check-literal.test index 104dd4d144e0..abdbf733a679 100644 --- a/test-data/unit/check-literal.test +++ b/test-data/unit/check-literal.test @@ -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 "" +if object(): + reveal_type(unify(f2)) # N: Revealed type is "" 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]"