(builder: IRBuilder, cl: ClassIR, line: int)
| 834 | |
| 835 | |
| 836 | def check_deletable_declaration(builder: IRBuilder, cl: ClassIR, line: int) -> None: |
| 837 | for attr in cl.deletable: |
| 838 | if attr not in cl.attributes: |
| 839 | if not cl.has_attr(attr): |
| 840 | builder.error(f'Attribute "{attr}" not defined', line) |
| 841 | continue |
| 842 | for base in cl.mro: |
| 843 | if attr in base.property_types: |
| 844 | builder.error(f'Cannot make property "{attr}" deletable', line) |
| 845 | break |
| 846 | else: |
| 847 | _, base = cl.attr_details(attr) |
| 848 | builder.error( |
| 849 | ('Attribute "{}" not defined in "{}" ' + '(defined in "{}")').format( |
| 850 | attr, cl.name, base.name |
| 851 | ), |
| 852 | line, |
| 853 | ) |
| 854 | |
| 855 | |
| 856 | def create_ne_from_eq(builder: IRBuilder, cdef: ClassDef) -> None: |
no test coverage detected
searching dependent graphs…