zig/test/behavior/underscore.zig
joachimschmidt557 b56b4428a3 stage2 ARM: fix recursive fibonacci
Some handling of register_c_flag/register_v_flag was incorrect.
2022-05-22 21:02:32 +02:00

23 lines
514 B
Zig

const std = @import("std");
const builtin = @import("builtin");
const expect = std.testing.expect;
test "ignore lval with underscore" {
_ = false;
}
test "ignore lval with underscore (while loop)" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
while (optionalReturnError()) |_| {
while (optionalReturnError()) |_| {
break;
} else |_| {}
break;
} else |_| {}
}
fn optionalReturnError() !?u32 {
return error.optionalReturnError;
}