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

// error
// backend=stage2
// target=native
//
// :2:15: error: switch must handle all possibilities
// :8:15: error: switch must handle all possibilities