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(
30193019 gpa: Allocator,
30203020 enum_type: Key.IncompleteEnumType,
30213021) Allocator.Error!InternPool.IncompleteEnumType {
3022 try ip.items.ensureUnusedCapacity(gpa, 1);
30223023 switch (enum_type.tag_mode) {
30233024 .auto => return getIncompleteEnumAuto(ip, gpa, enum_type),
30243025 .explicit => return getIncompleteEnumExplicit(ip, gpa, enum_type, .type_enum_explicit),
......@@ -3073,7 +3074,7 @@ pub fn getIncompleteEnumAuto(
30733074 };
30743075}
30753076
3076pub fn getIncompleteEnumExplicit(
3077fn getIncompleteEnumExplicit(
30773078 ip: *InternPool,
30783079 gpa: Allocator,
30793080 enum_type: Key.IncompleteEnumType,