commit e4d498cd3add8d3ccbcb4d5899769cca49a4837c (tree)
parent 7e19c9566860e78ad536aaa678af8c32531fade9
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sat, 20 May 2023 17:59:54 -0700
InternPool: add missing ensureCapacity call with enums
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/InternPool.zig b/src/InternPool.zig
@@ -3019,6 +3019,7 @@ pub fn getIncompleteEnum(
gpa: Allocator,
enum_type: Key.IncompleteEnumType,
) Allocator.Error!InternPool.IncompleteEnumType {
+ try ip.items.ensureUnusedCapacity(gpa, 1);
switch (enum_type.tag_mode) {
.auto => return getIncompleteEnumAuto(ip, gpa, enum_type),
.explicit => return getIncompleteEnumExplicit(ip, gpa, enum_type, .type_enum_explicit),
@@ -3073,7 +3074,7 @@ pub fn getIncompleteEnumAuto(
};
}
-pub fn getIncompleteEnumExplicit(
+fn getIncompleteEnumExplicit(
ip: *InternPool,
gpa: Allocator,
enum_type: Key.IncompleteEnumType,