aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/switch_with_overlapping_case_ranges.zig
blob: 5b272e5c84a8d9295697add83d0627a7b22c5fc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export fn entry() void {
    var q: u8 = 0;
    switch ((&q).*) {
        1...2 => {},
        0...255 => {},
    }
}

// error
//
// :5:10: error: duplicate switch value
// :4:10: note: previous value here