commit c9db8878006fe53eb438bc6a6f2d2416cc5ef412 (tree) parent b8203fac1b272d4f13f668797cf356d995b7967f Author: Jakub Konka <kubkon@jakubkonka.com> Date: Thu, 15 Aug 2024 08:38:08 +0200 builtin: init test_functions to empty slice to avoid coercing to undefined Diffstat:
| M | src/Builtin.zig | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Builtin.zig b/src/Builtin.zig @@ -218,7 +218,7 @@ pub fn append(opts: @This(), buffer: *std.ArrayList(u8)) Allocator.Error!void { if (opts.is_test) { try buffer.appendSlice( - \\pub var test_functions: []const std.builtin.TestFn = undefined; // overwritten later + \\pub var test_functions: []const std.builtin.TestFn = &.{}; // overwritten later \\ ); }