diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-03-14 03:37:54 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-03-14 03:37:54 -0400 |
| commit | efebb6d341306d508163e7bb5ded41f4bc0468d4 (patch) | |
| tree | cd1dc6143a6dea7fcb35e35487803d21840d097a | |
| parent | c828c23f71055fc4614ada20a20fb1c7bfee50c6 (diff) | |
| download | zig-efebb6d341306d508163e7bb5ded41f4bc0468d4.tar.gz zig-efebb6d341306d508163e7bb5ded41f4bc0468d4.zip | |
fix tests broken by previous commit
| -rw-r--r-- | src/ir.cpp | 2 | ||||
| -rw-r--r-- | test/compile_errors.zig | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 51a538db59..db9a2b24c3 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -15222,7 +15222,7 @@ static TypeTableEntry *ir_analyze_instruction_offset_of(IrAnalyze *ira, 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, buf_sprintf("zero-bit field '%s' in struct '%s' has no offset", buf_ptr(field_name), buf_ptr(&container_type->name))); diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 027e000953..68737eee1a 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -3150,5 +3150,5 @@ pub fn addCases(cases: &tests.CompileErrorContext) void { \\ 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"); } |
