| ... | ... | @@ -30757,16 +30757,17 @@ fn generateUnionTagTypeNumbered( |
| 30757 | 30757 | new_decl.name_fully_qualified = true; |
| 30758 | 30758 | errdefer mod.abortAnonDecl(new_decl_index); |
| 30759 | 30759 | |
| 30760 | const copied_int_ty = try int_ty.copy(new_decl_arena_allocator); |
| 30760 | 30761 | enum_obj.* = .{ |
| 30761 | 30762 | .owner_decl = new_decl_index, |
| 30762 | | .tag_ty = int_ty, |
| 30763 | .tag_ty = copied_int_ty, |
| 30763 | 30764 | .fields = .{}, |
| 30764 | 30765 | .values = .{}, |
| 30765 | 30766 | }; |
| 30766 | 30767 | // Here we pre-allocate the maps using the decl arena. |
| 30767 | 30768 | try enum_obj.fields.ensureTotalCapacity(new_decl_arena_allocator, fields_len); |
| 30768 | 30769 | try enum_obj.values.ensureTotalCapacityContext(new_decl_arena_allocator, fields_len, .{ |
| 30769 | | .ty = int_ty, |
| 30770 | .ty = copied_int_ty, |
| 30770 | 30771 | .mod = mod, |
| 30771 | 30772 | }); |
| 30772 | 30773 | try new_decl.finalizeNewArena(&new_decl_arena); |