#zig build-exe {
--name test
-Mroot=test.zig
#}

#write test.zig {
const MyEnum = enum(u8) {
    foo = 1,
    bar = 2,
};
pub fn main() !void {
    var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
    try stdout_writer.interface.print("{}\n", .{@backingInt(MyEnum.foo)});
}
const std = @import("std");
const io = std.Io.Threaded.global_single_threaded.io();
#}
#update
#check stdout {
1
#}

#write test.zig {
const MyEnum = enum(u8) {
    //foo = 1,
    bar = 2,
};
pub fn main() !void {
    var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
    try stdout_writer.interface.print("{}\n", .{@backingInt(MyEnum.foo)});
}
const std = @import("std");
const io = std.Io.Threaded.global_single_threaded.io();
#}
#update "remove enum field"
#check errors {
test.zig:7:68: error: enum 'test.MyEnum' has no member named 'foo'
test.zig:1:16: note: enum declared here
#}
