aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/reassign_to_slice_parameter.zig
blob: 235c483216e63c9bfb14306b4c588988f528534d (plain)
1
2
3
4
5
6
7
8
9
10
pub fn reassign(s: []const u8) void {
    s = s[0..];
}
export fn entry() void {
    reassign("foo");
}

// error
//
// :2:5: error: cannot assign to constant