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

#write test.zig {
const Set1 = error{
    A,
    B,
};
const Set2 = error{
    A,
    C,
};
comptime {
    const x = @intFromError(Set1.B);
    const y: Set2 = @errorCast(@errorFromInt(x));
    _ = y;
}
#}
#update
#check errors {
test.zig:11:21: error: 'error.B' not a member of error set 'error{A,C}'
#}
