builtin: init test_functions to empty slice to avoid coercing to undefined

This commit is contained in:
Jakub Konka 2024-08-15 08:38:08 +02:00
parent b8203fac1b
commit c9db887800

View File

@ -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
\\
);
}