aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/switch_on_slice.zig
blob: c2b28f67abb931404b9bb5fa41cf606a1f622820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
pub export fn entry() void {
    var a: [:0]const u8 = "foo";
    switch (a) {
        ("--version"), ("version") => unreachable,
        else => {},
    }
}

// error
// backend=stage2
// target=native
//
// :3:13: error: switch on type '[:0]const u8'