We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6f630b commit 7155298Copy full SHA for 7155298
1 file changed
test-data/unit/check-narrowing.test
@@ -3040,6 +3040,11 @@ class A:
3040
reveal_type(self) # N: Revealed type is "__main__.A"
3041
reveal_type(x) # N: Revealed type is "builtins.object"
3042
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
3048
[builtins fixtures/primitives.pyi]
3049
3050
[case testNarrowInElseCaseIfFinal]
0 commit comments