aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-05-20 17:59:54 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:54 -0700
commite4d498cd3add8d3ccbcb4d5899769cca49a4837c (patch)
tree2090c8bfabe04d6c10fb1fc2e70be1f69b06d5d2 /src
parent7e19c9566860e78ad536aaa678af8c32531fade9 (diff)
downloadzig-e4d498cd3add8d3ccbcb4d5899769cca49a4837c.tar.gz
zig-e4d498cd3add8d3ccbcb4d5899769cca49a4837c.zip
InternPool: add missing ensureCapacity call with enums
Diffstat (limited to 'src')
-rw-r--r--src/InternPool.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig
index b9b706e499..5a7500cafd 100644
--- 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,