mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 10:05:10 +01:00
Companion commit to 61a53a5875.
This commit also moves over a bunch of behavior test cases to the
passing-for-stage2 section.
19 lines
403 B
Zig
19 lines
403 B
Zig
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
|
|
test "ignore lval with underscore" {
|
|
_ = false;
|
|
}
|
|
|
|
test "ignore lval with underscore (while loop)" {
|
|
while (optionalReturnError()) |_| {
|
|
while (optionalReturnError()) |_| {
|
|
break;
|
|
} else |_| {}
|
|
break;
|
|
} else |_| {}
|
|
}
|
|
|
|
fn optionalReturnError() !?u32 {
|
|
return error.optionalReturnError;
|
|
}
|