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

#write test.zig {
const E = enum { a, b, c, d };
export fn entry() void {
    var x: E = .a;
    switch (x) {
        inline .a, .b => |aorb, d| @compileLog(aorb, d),
        inline .c, .d => |*cord| @compileLog(cord),
    }
}
#}
#update
#check errors {
test.zig:5:33: error: cannot capture tag of non-union type 'test.E'
test.zig:1:11: note: enum declared here
#}
