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

// error
// backend=stage2
// target=native
//
// :2:23: error: expected error union type, found 'bool'