Skip to content

Commit 287cf0b

Browse files
committed
[mypyc] Fix subclass processing in detect_undefined_bitmap
Incorrect processing in detect_undefined_bitmap could cause a ValueError exception in emit_undefined_attr_check.
1 parent cbe28b2 commit 287cf0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypyc/analysis/attrdefined.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def detect_undefined_bitmap(cl: ClassIR, seen: set[ClassIR]) -> None:
421421
return
422422
seen.add(cl)
423423
for base in cl.base_mro[1:]:
424-
detect_undefined_bitmap(cl, seen)
424+
detect_undefined_bitmap(base, seen)
425425

426426
if len(cl.base_mro) > 1:
427427
cl.bitmap_attrs.extend(cl.base_mro[1].bitmap_attrs)

0 commit comments

Comments
 (0)