2018-08-02 18:55:31 +01:00
|
|
|
const std = @import("std");
|
2022-02-22 13:15:09 +00:00
|
|
|
const builtin = @import("builtin");
|
2019-02-08 23:18:47 +00:00
|
|
|
const expect = std.testing.expect;
|
2018-08-02 18:55:31 +01:00
|
|
|
|
|
|
|
test "ignore lval with underscore" {
|
|
|
|
_ = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
test "ignore lval with underscore (while loop)" {
|
2022-02-22 13:15:09 +00:00
|
|
|
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
|
|
|
|
2018-08-02 18:55:31 +01:00
|
|
|
while (optionalReturnError()) |_| {
|
2018-10-15 14:51:15 +01:00
|
|
|
while (optionalReturnError()) |_| {
|
|
|
|
break;
|
|
|
|
} else |_| {}
|
|
|
|
break;
|
|
|
|
} else |_| {}
|
2018-08-02 18:55:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
fn optionalReturnError() !?u32 {
|
|
|
|
return error.optionalReturnError;
|
|
|
|
}
|