| ... | @@ -22062,7 +22062,8 @@ fn reifyEnum( | ... | @@ -22062,7 +22062,8 @@ fn reifyEnum( |
| 22062 | return Air.internedToRef(ty); | 22062 | return Air.internedToRef(ty); |
| 22063 | }, | 22063 | }, |
| 22064 | }; | 22064 | }; |
| 22065 | errdefer wip_ty.cancel(ip, pt.tid); | 22065 | var done = false; |
| | 22066 | errdefer if (!done) wip_ty.cancel(ip, pt.tid); |
| 22066 | | 22067 | |
| 22067 | if (tag_ty.zigTypeTag(mod) != .Int) { | 22068 | if (tag_ty.zigTypeTag(mod) != .Int) { |
| 22068 | return sema.fail(block, src, "Type.Enum.tag_type must be an integer type", .{}); | 22069 | return sema.fail(block, src, "Type.Enum.tag_type must be an integer type", .{}); |
| ... | @@ -22088,6 +22089,7 @@ fn reifyEnum( | ... | @@ -22088,6 +22089,7 @@ fn reifyEnum( |
| 22088 | try sema.addTypeReferenceEntry(src, wip_ty.index); | 22089 | try sema.addTypeReferenceEntry(src, wip_ty.index); |
| 22089 | wip_ty.prepare(ip, new_cau_index, new_namespace_index); | 22090 | wip_ty.prepare(ip, new_cau_index, new_namespace_index); |
| 22090 | wip_ty.setTagTy(ip, tag_ty.toIntern()); | 22091 | wip_ty.setTagTy(ip, tag_ty.toIntern()); |
| | 22092 | done = true; |
| 22091 | | 22093 | |
| 22092 | for (0..fields_len) |field_idx| { | 22094 | for (0..fields_len) |field_idx| { |
| 22093 | const field_info = try fields_val.elemValue(pt, field_idx); | 22095 | const field_info = try fields_val.elemValue(pt, field_idx); |