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

// error
//
// :4:9: error: unable to resolve comptime value
// :4:9: note: switch prong values must be comptime-known