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

// error
// backend=llvm
// target=native
//
// :2:10: error: cannot assign to constant