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

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