| 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); |
| 3 | const expect = std.testing.expect; |
| 4 | |
| 5 | test "ignore lval with underscore" { |
| 6 | _ = false; |
| 7 | } |
| 8 | |
| 9 | test "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 | |
| 20 | fn optionalReturnError() !?u32 { |
| 21 | return error.optionalReturnError; |
| 22 | } |