mirror of
https://github.com/ziglang/zig.git
synced 2025-12-17 19:53:06 +00:00
fix tests broken by previous commit
This commit is contained in:
parent
c828c23f71
commit
efebb6d341
@ -15222,7 +15222,7 @@ static TypeTableEntry *ir_analyze_instruction_offset_of(IrAnalyze *ira,
|
|||||||
return ira->codegen->builtin_types.entry_invalid;
|
return ira->codegen->builtin_types.entry_invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field->type_entry->zero_bits) {
|
if (!type_has_bits(field->type_entry)) {
|
||||||
ir_add_error(ira, field_name_value,
|
ir_add_error(ira, field_name_value,
|
||||||
buf_sprintf("zero-bit field '%s' in struct '%s' has no offset",
|
buf_sprintf("zero-bit field '%s' in struct '%s' has no offset",
|
||||||
buf_ptr(field_name), buf_ptr(&container_type->name)));
|
buf_ptr(field_name), buf_ptr(&container_type->name)));
|
||||||
|
|||||||
@ -3150,5 +3150,5 @@ pub fn addCases(cases: &tests.CompileErrorContext) void {
|
|||||||
\\ const fieldOffset = @offsetOf(Empty, "val");
|
\\ const fieldOffset = @offsetOf(Empty, "val");
|
||||||
\\}
|
\\}
|
||||||
,
|
,
|
||||||
".tmp_source.zig:5:42: error: zero-bit field 'val' has no offset in struct 'Empty'");
|
".tmp_source.zig:5:42: error: zero-bit field 'val' in struct 'Empty' has no offset");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user