commit 55ec2148fd35e3d5f9070cec58a0dce5fc1ed500 (tree)
parent 616f65df750f53e6334cc5ed2c8f4b5668d573f2
Author: Loris Cro <kappaloris@gmail.com>
Date: Thu, 4 Aug 2022 23:24:18 +0200
autodoc: fix analysis of function return types
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/Autodoc.zig b/src/Autodoc.zig
@@ -3497,10 +3497,9 @@ fn analyzeFunction(
},
},
else => blk: {
- //const last_instr_index = fn_info.ret_ty_body[fn_info.ret_ty_body.len - 1];
- //const break_operand = data[last_instr_index].@"break".operand;
- //const wr = try self.walkRef(file, scope, break_operand, false);
- const wr = try self.walkRef(file, scope, fn_info.ret_ty_ref, false);
+ const last_instr_index = fn_info.ret_ty_body[fn_info.ret_ty_body.len - 1];
+ const break_operand = data[last_instr_index].@"break".operand;
+ const wr = try self.walkRef(file, scope, break_operand, false);
break :blk wr.expr;
},
};