master
 1const std = @import("std");
 2const builtin = @import("builtin");
 3const expect = std.testing.expect;
 4
 5test "ignore lval with underscore" {
 6    _ = false;
 7}
 8
 9test "ignore lval with underscore (while loop)" {
10    if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
11
12    while (optionalReturnError()) |_| {
13        while (optionalReturnError()) |_| {
14            break;
15        } else |_| {}
16        break;
17    } else |_| {}
18}
19
20fn optionalReturnError() !?u32 {
21    return error.optionalReturnError;
22}