mirror of
https://github.com/ziglang/zig.git
synced 2026-01-31 03:33:37 +00:00
builtin: init test_functions to empty slice to avoid coercing to undefined
This commit is contained in:
parent
b8203fac1b
commit
c9db887800
@ -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
|
||||
\\
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user