diff options
| author | Loris Cro <kappaloris@gmail.com> | 2022-08-02 17:48:15 +0200 |
|---|---|---|
| committer | Loris Cro <kappaloris@gmail.com> | 2022-08-02 17:49:36 +0200 |
| commit | 447a4cc115f5d105d49fcb3e970082b89e5a46dd (patch) | |
| tree | 45fae965683e5638efa0bd2bf2d22ad173769b6e /src | |
| parent | c5afefec427f2f2aeb25fe8f7114b5a0a6aa1129 (diff) | |
| download | zig-447a4cc115f5d105d49fcb3e970082b89e5a46dd.tar.gz zig-447a4cc115f5d105d49fcb3e970082b89e5a46dd.zip | |
autodoc: fix off-by-1 error in analysis of pointer types
Diffstat (limited to 'src')
| -rw-r--r-- | src/Autodoc.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Autodoc.zig b/src/Autodoc.zig index 1ed2694553..35f9dc7dea 100644 --- a/src/Autodoc.zig +++ b/src/Autodoc.zig @@ -1399,7 +1399,6 @@ fn walkInstruction( const extra = file.zir.extraData(Zir.Inst.PtrType, ptr.payload_index); var extra_index = extra.end; - const type_slot_index = self.types.items.len; const elem_type_ref = try self.walkRef( file, parent_scope, @@ -1446,6 +1445,7 @@ fn walkInstruction( host_size = ref_result.expr; } + const type_slot_index = self.types.items.len; try self.types.append(self.arena, .{ .Pointer = .{ .size = ptr.size, @@ -2994,7 +2994,7 @@ fn tryResolveRefPath( "TODO: handle `{s}`in tryResolveRefPath\nInfo: {}", .{ @tagName(resolved_parent), resolved_parent }, ); - path[i + 1] = (try self.cteTodo("match failure")).expr; + path[i + 1] = (try self.cteTodo("<match failure>")).expr; continue :outer; }, .comptimeExpr, .call, .typeOf => { |
