diff options
Diffstat (limited to 'src/codegen')
| -rw-r--r-- | src/codegen/c.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 7b091d6823..8d2ba2bbb8 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -642,7 +642,7 @@ pub const DeclGen = struct { // Ensure complete type definition is visible before accessing fields. _ = try dg.typeToIndex(base_ty, .complete); const field_ty = switch (mod.intern_pool.indexToKey(base_ty.toIntern())) { - .anon_struct_type, .struct_type, .union_type => base_ty.structFieldType(field.index, mod), + .anon_struct_type, .struct_type, .union_type => base_ty.structFieldType(@intCast(usize, field.index), mod), .ptr_type => |ptr_type| switch (ptr_type.flags.size) { .One, .Many, .C => unreachable, .Slice => switch (field.index) { |
