Hi,
I am new to zig, currently stumble upon issue with zig 0.16.0.
I encountered if the code path has white(true), it can make the zig 0.16.0 compiler hang forever.
// code example (ai generated)
const std = @import("std");
fn comptimeLoop() u32 {
@setEvalBranchQuota(1_000_000_000);
var i: u32 = 0;
while (true) {
i +%= 1;
}
return i;
}
test "compiler hangs at comptime" {
const result = comptime comptimeLoop();
try std.testing.expect(result > 0);
}
or a simple test:
test "runtime infinite loop hangs test runner" {
while (true) {}
}
.
Is it expected for the latest zig compiler?