We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac385bd commit 2d2d79aCopy full SHA for 2d2d79a
src/Autodoc.zig
@@ -2396,7 +2396,19 @@ fn walkInstruction(
2396
2397
return DocData.WalkResult{
2398
.typeRef = if (callee.typeRef) |tr| switch (tr) {
2399
- .type => |func_type_idx| self.types.items[func_type_idx].Fn.ret,
+ .type => |func_type_idx| switch (self.types.items[func_type_idx]) {
2400
+ .Fn => |func| func.ret,
2401
+ else => blk: {
2402
+ printWithContext(
2403
+ file,
2404
+ inst_index,
2405
+ "unexpected callee type in walkInstruction.call: `{s}`\n",
2406
+ .{@tagName(self.types.items[func_type_idx])},
2407
+ );
2408
+
2409
+ break :blk null;
2410
+ },
2411
2412
else => null,
2413
} else null,
2414
.expr = .{ .call = call_slot_index },
0 commit comments