Skip to content

Commit efebb6d

Browse files
committedMar 14, 2018
fix tests broken by previous commit
1 parent c828c23 commit efebb6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/ir.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15222,7 +15222,7 @@ static TypeTableEntry *ir_analyze_instruction_offset_of(IrAnalyze *ira,
1522215222
return ira->codegen->builtin_types.entry_invalid;
1522315223
}
1522415224

15225-
if (field->type_entry->zero_bits) {
15225+
if (!type_has_bits(field->type_entry)) {
1522615226
ir_add_error(ira, field_name_value,
1522715227
buf_sprintf("zero-bit field '%s' in struct '%s' has no offset",
1522815228
buf_ptr(field_name), buf_ptr(&container_type->name)));

‎test/compile_errors.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -3150,5 +3150,5 @@ pub fn addCases(cases: &tests.CompileErrorContext) void {
31503150
\\ const fieldOffset = @offsetOf(Empty, "val");
31513151
\\}
31523152
,
3153-
".tmp_source.zig:5:42: error: zero-bit field 'val' has no offset in struct 'Empty'");
3153+
".tmp_source.zig:5:42: error: zero-bit field 'val' in struct 'Empty' has no offset");
31543154
}

0 commit comments

Comments
 (0)
Please sign in to comment.