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

#write test.zig {
fn f(x: u32) void {
    const value: bool = switch (x) {
        1234 => false,
        else => true,
        else => true,
    };
}
fn g(x: error{ Foo, Bar, Baz }!u32) void {
    const value: bool = if (x) |_| true else |e| switch (e) {
        error.Foo => false,
        else => true,
        else => true,
    };
}
fn h(x: error{ Foo, Bar, Baz }!u32) void {
    const value: u32 = x catch |e| switch (e) {
        error.Foo => 1,
        else => 2,
        else => 3,
    };
}
export fn entry() void {
    f(1234);
    g(1234);
    h(1234);
}
#}
#update
#check errors {
test.zig:5:9: error: multiple else prongs in switch expression
test.zig:4:9: note: previous else prong here
test.zig:12:9: error: multiple else prongs in switch expression
test.zig:11:9: note: previous else prong here
test.zig:19:9: error: multiple else prongs in switch expression
test.zig:18:9: note: previous else prong here
#}
