| ... | ... | @@ -17841,11 +17841,18 @@ fn zirThis( |
| 17841 | 17841 | const zcu = pt.zcu; |
| 17842 | 17842 | const namespace = pt.zcu.namespacePtr(block.namespace); |
| 17843 | 17843 | |
| 17844 | | const new_ty = try pt.ensureTypeUpToDate(namespace.owner_type); |
| 17845 | | |
| 17846 | | switch (pt.zcu.intern_pool.indexToKey(new_ty)) { |
| 17847 | | .struct_type, .union_type => try sema.declareDependency(.{ .interned = new_ty }), |
| 17844 | switch (pt.zcu.intern_pool.indexToKey(namespace.owner_type)) { |
| 17845 | .opaque_type => { |
| 17846 | // Opaque types are never outdated since they don't undergo type resolution, so nothing to do! |
| 17847 | return Air.internedToRef(namespace.owner_type); |
| 17848 | }, |
| 17849 | .struct_type, .union_type => { |
| 17850 | const new_ty = try pt.ensureTypeUpToDate(namespace.owner_type); |
| 17851 | try sema.declareDependency(.{ .interned = new_ty }); |
| 17852 | return Air.internedToRef(new_ty); |
| 17853 | }, |
| 17848 | 17854 | .enum_type => { |
| 17855 | const new_ty = try pt.ensureTypeUpToDate(namespace.owner_type); |
| 17849 | 17856 | try sema.declareDependency(.{ .interned = new_ty }); |
| 17850 | 17857 | // Since this is an enum, it has to be resolved immediately. |
| 17851 | 17858 | // `ensureTypeUpToDate` has resolved the new type if necessary. |
| ... | ... | @@ -17854,11 +17861,10 @@ fn zirThis( |
| 17854 | 17861 | if (zcu.failed_analysis.contains(ty_unit) or zcu.transitive_failed_analysis.contains(ty_unit)) { |
| 17855 | 17862 | return error.AnalysisFail; |
| 17856 | 17863 | } |
| 17864 | return Air.internedToRef(new_ty); |
| 17857 | 17865 | }, |
| 17858 | | .opaque_type => {}, |
| 17859 | 17866 | else => unreachable, |
| 17860 | 17867 | } |
| 17861 | | return Air.internedToRef(new_ty); |
| 17862 | 17868 | } |
| 17863 | 17869 | |
| 17864 | 17870 | fn zirClosureGet(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData) CompileError!Air.Inst.Ref { |