aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/missing_boolean_switch_value.zig
blob: f9b464ba3d1e407212dfec3d7bf55ee039d636be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
comptime {
    const x = switch (true) {
        true => false,
    };
    _ = x;
}
comptime {
    const x = switch (true) {
        false => true,
    };
    _ = x;
}

// error
//
// :2:15: error: switch must handle all possibilities
// :8:15: error: switch must handle all possibilities