Commit c9db887800

Jakub Konka <kubkon@jakubkonka.com>
2024-08-15 08:38:08
builtin: init test_functions to empty slice to avoid coercing to undefined
1 parent b8203fa
Changed files (1)
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
             \\
         );
     }