diff --git a/lib/docs/main.js b/lib/docs/main.js
index 5ee39ec893..064099e1ad 100644
--- a/lib/docs/main.js
+++ b/lib/docs/main.js
@@ -2215,6 +2215,7 @@ var zigAnalysis;
}
if (typesList.length !== 0) {
+ window.x = typesList;
resizeDomList(domListTypes, typesList.length, '
');
for (let i = 0; i < typesList.length; i += 1) {
let liDom = domListTypes.children[i];
@@ -2252,7 +2253,6 @@ var zigAnalysis;
if (fnsList.length !== 0) {
resizeDomList(domListFns, fnsList.length, '');
- window.x = domListFns;
for (let i = 0; i < fnsList.length; i += 1) {
let decl = fnsList[i];
let trDom = domListFns.children[i];
@@ -2594,7 +2594,7 @@ var zigAnalysis;
if (list[mainDeclIndex] != null) continue;
let decl = zigAnalysis.decls[mainDeclIndex];
- let declVal = decl.value; //resolveValue(decl.value);
+ let declVal = resolveValue(decl.value);
let declNames = item.declNames.concat([decl.name]);
list[mainDeclIndex] = {
pkgNames: pkgNames,
@@ -2615,7 +2615,7 @@ var zigAnalysis;
}
- // Generic function
+ // Generic fun/ction
if (value.kind == typeKinds.Fn && value.generic_ret != null) {
let resolvedVal = resolveValue({ expr: value.generic_ret});
if ("type" in resolvedVal.expr) {
diff --git a/src/Autodoc.zig b/src/Autodoc.zig
index a98ad7aee0..c2b0359c64 100644
--- 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;
},
};
diff --git a/test/cli.zig b/test/cli.zig
index 7c0238e771..979478c786 100644
--- a/test/cli.zig
+++ b/test/cli.zig
@@ -104,7 +104,8 @@ fn testZigInitLib(zig_exe: []const u8, dir_path: []const u8) !void {
fn testZigInitExe(zig_exe: []const u8, dir_path: []const u8) !void {
_ = try exec(dir_path, true, &[_][]const u8{ zig_exe, "init-exe" });
const run_result = try exec(dir_path, true, &[_][]const u8{ zig_exe, "build", "run" });
- try testing.expectEqualStrings("info: All your codebase are belong to us.\n", run_result.stderr);
+ try testing.expectEqualStrings("All your codebase are belong to us.\n", run_result.stderr);
+ try testing.expectEqualStrings("Run `zig build test` to run the tests.\n", run_result.stdout);
}
fn testGodboltApi(zig_exe: []const u8, dir_path: []const u8) anyerror!void {