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

#write test.zig {
const E = enum(u8) {
    a,
    b,
    _,
};
const U = union(E) {
    a: i32,
    b: u32,
};
export fn entry1() void {
    const e: E = .b;
    switch (e) {
        .a, _ => {},
    }
}
export fn entry2() void {
    const u = U{ .a = 2 };
    switch (u) {
        .a => {},
        .b, _ => {},
    }
}
#}
#update
#check errors {
test.zig:12:5: error: switch must handle all possibilities
test.zig:3:5: note: unhandled enumeration value: 'b'
test.zig:1:11: note: enum 'test.E' declared here
test.zig:18:5: error: '_' prong only allowed when switching on non-exhaustive enums
test.zig:20:13: note: '_' prong here
test.zig:18:5: note: consider using 'else'
#}
