Skip to content

Commit 7155298

Browse files
committed
.
1 parent b6f630b commit 7155298

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test-data/unit/check-narrowing.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3040,6 +3040,11 @@ class A:
30403040
reveal_type(self) # N: Revealed type is "__main__.A"
30413041
reveal_type(x) # N: Revealed type is "builtins.object"
30423042

3043+
class B:
3044+
y: int
3045+
3046+
def __eq__(self, other: object) -> bool:
3047+
return type(other) is type(self) and other.y == self.y
30433048
[builtins fixtures/primitives.pyi]
30443049

30453050
[case testNarrowInElseCaseIfFinal]

0 commit comments

Comments
 (0)