mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
InternPool: add missing ensureCapacity call with enums
This commit is contained in:
parent
7e19c95668
commit
e4d498cd3a
1 changed files with 2 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue