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

#write test.zig {
export fn foo() void {
    while (bar()) |x| {
        _ = x;
    }
}
fn bar() anyerror!i32 {
    return 1;
}
#}
#update
#check errors {
test.zig:2:15: error: expected optional type, found 'anyerror!i32'
test.zig:2:15: note: consider using 'try', 'catch', or 'if'
#}
