#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
export fn a() void {
    while (true) : (bad()) {}
}
export fn b() void {
    var x: anyerror!i32 = 1234;
    _ = &x;
    while (x) |_| : (bad()) {} else |_| {}
}
export fn c() void {
    var x: ?i32 = 1234;
    _ = &x;
    while (x) |_| : (bad()) {}
}
fn bad() anyerror!void {
    return error.Bad;
}

export fn d() void {
    while (true) : (bad2()) {}
}
fn bad2() anyerror {
    return error.Bad;
}
#}
#update
#check errors {
test.zig:2:24: error: error union of type 'anyerror!void' is ignored
test.zig:2:24: note: consider using 'try', 'catch', or 'if'
test.zig:7:25: error: error union of type 'anyerror!void' is ignored
test.zig:7:25: note: consider using 'try', 'catch', or 'if'
test.zig:12:25: error: error union of type 'anyerror!void' is ignored
test.zig:12:25: note: consider using 'try', 'catch', or 'if'
test.zig:19:25: error: error set of type 'anyerror' is ignored
#}
