diff options
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/type.zig b/src/type.zig index eef3783fe6..709b115e09 100644 --- a/src/type.zig +++ b/src/type.zig @@ -2415,6 +2415,7 @@ pub const Type = struct { for (field_vals, 0..) |*field_val, i_usize| { const i: u32 = @intCast(i_usize); if (struct_type.fieldIsComptime(ip, i)) { + assert(struct_type.haveFieldInits(ip)); field_val.* = struct_type.field_inits.get(ip)[i]; continue; } @@ -3014,6 +3015,7 @@ pub const Type = struct { const ip = &mod.intern_pool; switch (ip.indexToKey(ty.toIntern())) { .struct_type => |struct_type| { + assert(struct_type.haveFieldInits(ip)); if (struct_type.fieldIsComptime(ip, index)) { return struct_type.field_inits.get(ip)[index].toValue(); } else { |
