authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-14 03:37:54-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-14 03:37:54-04:00
logefebb6d341306d508163e7bb5ded41f4bc0468d4
treecd1dc6143a6dea7fcb35e35487803d21840d097a
parentc828c23f71055fc4614ada20a20fb1c7bfee50c6

fix tests broken by previous commit


2 files changed, 2 insertions(+), 2 deletions(-)

src/ir.cpp+1-1
...@@ -15222,7 +15222,7 @@ static TypeTableEntry *ir_analyze_instruction_offset_of(IrAnalyze *ira,...@@ -15222,7 +15222,7 @@ static TypeTableEntry *ir_analyze_instruction_offset_of(IrAnalyze *ira,
15222 return ira->codegen->builtin_types.entry_invalid;15222 return ira->codegen->builtin_types.entry_invalid;
15223 }15223 }
1522415224
15225 if (field->type_entry->zero_bits) {15225 if (!type_has_bits(field->type_entry)) {
15226 ir_add_error(ira, field_name_value,15226 ir_add_error(ira, field_name_value,
15227 buf_sprintf("zero-bit field '%s' in struct '%s' has no offset",15227 buf_sprintf("zero-bit field '%s' in struct '%s' has no offset",
15228 buf_ptr(field_name), buf_ptr(&container_type->name)));15228 buf_ptr(field_name), buf_ptr(&container_type->name)));
test/compile_errors.zig+1-1
...@@ -3150,5 +3150,5 @@ pub fn addCases(cases: &tests.CompileErrorContext) void {...@@ -3150,5 +3150,5 @@ pub fn addCases(cases: &tests.CompileErrorContext) void {
3150 \\ const fieldOffset = @offsetOf(Empty, "val");3150 \\ const fieldOffset = @offsetOf(Empty, "val");
3151 \\}3151 \\}
3152 ,3152 ,
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");
3154}3154}