stage2: fix @sizeOf for structs with comptime fields
This commit is contained in:
@@ -5177,7 +5177,7 @@ pub const Type = extern union {
|
||||
|
||||
const field = it.struct_obj.fields.values()[it.field];
|
||||
defer it.field += 1;
|
||||
if (!field.ty.hasRuntimeBits())
|
||||
if (!field.ty.hasRuntimeBits() or field.is_comptime)
|
||||
return FieldOffset{ .field = it.field, .offset = it.offset };
|
||||
|
||||
const field_align = field.normalAlignment(it.target);
|
||||
|
||||
Reference in New Issue
Block a user