authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-05-20 17:59:54-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-06-10 20:47:54-07:00
loge4d498cd3add8d3ccbcb4d5899769cca49a4837c
tree2090c8bfabe04d6c10fb1fc2e70be1f69b06d5d2
parent7e19c9566860e78ad536aaa678af8c32531fade9

InternPool: add missing ensureCapacity call with enums


1 files changed, 2 insertions(+), 1 deletions(-)

src/InternPool.zig+2-1
...@@ -3019,6 +3019,7 @@ pub fn getIncompleteEnum(...@@ -3019,6 +3019,7 @@ pub fn getIncompleteEnum(
3019 gpa: Allocator,3019 gpa: Allocator,
3020 enum_type: Key.IncompleteEnumType,3020 enum_type: Key.IncompleteEnumType,
3021) Allocator.Error!InternPool.IncompleteEnumType {3021) Allocator.Error!InternPool.IncompleteEnumType {
3022 try ip.items.ensureUnusedCapacity(gpa, 1);
3022 switch (enum_type.tag_mode) {3023 switch (enum_type.tag_mode) {
3023 .auto => return getIncompleteEnumAuto(ip, gpa, enum_type),3024 .auto => return getIncompleteEnumAuto(ip, gpa, enum_type),
3024 .explicit => return getIncompleteEnumExplicit(ip, gpa, enum_type, .type_enum_explicit),3025 .explicit => return getIncompleteEnumExplicit(ip, gpa, enum_type, .type_enum_explicit),
...@@ -3073,7 +3074,7 @@ pub fn getIncompleteEnumAuto(...@@ -3073,7 +3074,7 @@ pub fn getIncompleteEnumAuto(
3073 };3074 };
3074}3075}
30753076
3076pub fn getIncompleteEnumExplicit(3077fn getIncompleteEnumExplicit(
3077 ip: *InternPool,3078 ip: *InternPool,
3078 gpa: Allocator,3079 gpa: Allocator,
3079 enum_type: Key.IncompleteEnumType,3080 enum_type: Key.IncompleteEnumType,