(cl: ClassIR, seen: set[ClassIR])
| 415 | |
| 416 | |
| 417 | def detect_undefined_bitmap(cl: ClassIR, seen: set[ClassIR]) -> None: |
| 418 | if cl.is_trait: |
| 419 | return |
| 420 | |
| 421 | if cl in seen: |
| 422 | return |
| 423 | seen.add(cl) |
| 424 | for base in cl.base_mro[1:]: |
| 425 | detect_undefined_bitmap(base, seen) |
| 426 | |
| 427 | if len(cl.base_mro) > 1: |
| 428 | cl.bitmap_attrs.extend(cl.base_mro[1].bitmap_attrs) |
| 429 | for n, t in cl.attributes.items(): |
| 430 | if t.error_overlap and not cl.is_always_defined(n): |
| 431 | cl.bitmap_attrs.append(n) |
| 432 | |
| 433 | for base in cl.mro[1:]: |
| 434 | if base.is_trait: |
| 435 | for n, t in base.attributes.items(): |
| 436 | if t.error_overlap and not cl.is_always_defined(n) and n not in cl.bitmap_attrs: |
| 437 | cl.bitmap_attrs.append(n) |
no test coverage detected
searching dependent graphs…