zig/test/behavior/underscore.zig
joachimschmidt557 d6e6162081
stage2 AArch64: unify callee-preserved regs on all targets
also enables many passing behavior tests
2022-12-27 21:17:52 +08:00

23 lines
522 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_sparc64) return error.SkipZigTest; // TODO
while (optionalReturnError()) |_| {
while (optionalReturnError()) |_| {
break;
} else |_| {}
break;
} else |_| {}
}
fn optionalReturnError() !?u32 {
return error.optionalReturnError;
}