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

#write test.zig {
const SmallErrorSet = error{A};
export fn entry() void {
    const x: SmallErrorSet = foo();
    _ = x;
}
fn foo() anyerror {
    return error.B;
}
#}
#update
#check errors {
test.zig:3:33: error: expected type 'error{A}', found 'anyerror'
test.zig:3:33: note: global error set cannot cast into a smaller set
#}
