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

#write test.zig {
const E = enum(u8) { a, b, c };
export fn entry1() void {
    const x: E = @bitCast(@as(u8, 3));
    _ = x;
}

export fn entry2() void {
    const x: E = @bitCast(@as(u8, undefined));
    _ = x;
}
#}
#update
#check errors {
test.zig:3:18: error: enum 'test.E' has no tag with value '3'
test.zig:1:11: note: enum declared here
test.zig:8:27: error: use of undefined value here causes illegal behavior
#}
