aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/switch_on_non_err_union.zig
blob: d505c6d2f122864d5973dcd8af0779d7a7331dcd (plain)
1
2
3
4
5
6
7
8
9
10
pub fn main() void {
    false catch |err| switch (err) {
        else => {},
    };
}

// error
// target=x86_64-linux
//
// :2:23: error: expected error union type, found 'bool'