#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 = Set1.B;
    const y: Set2 = @errorCast(x);
    _ = y;
}
#}
#update
#check errors {
test.zig:5:21: error: 'error.B' not a member of error set 'error{A,C}'
#}
