Skip to content

Commit 676c724

Browse files
committed
Add test case
1 parent c8c3d50 commit 676c724

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mypy/test/data/check-classes.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,12 @@ class B:
12281228
[out]
12291229
main: note: In member "f" of class "B":
12301230

1231+
[case testClassVsInstanceDisambiguation]
1232+
class A: pass
1233+
def f(x: A) -> None: pass
1234+
f(A) # E: Argument 1 to "f" has incompatible type "A" (type object); expected "A"
1235+
[out]
1236+
12311237
-- TODO
12321238
-- attribute inherited from superclass; assign in __init__
12331239
-- refer to attribute before type has been inferred (the initialization in

0 commit comments

Comments
 (0)