aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/switch_expression-non_exhaustive_integer_prongs.zig
blob: 1314824fd3948923cc3f1af75b89c56beeab86bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn foo(x: u8) void {
    switch (x) {
        0 => {},
    }
}
export fn entry() usize {
    return @sizeOf(@TypeOf(&foo));
}

// error
//
// :2:5: error: switch must handle all possibilities