aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/reassign_to_array_parameter.zig
blob: ec7db76cbd8f8f9d065ad90c5095d5d9659bcaa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn reassign(a: [3]f32) void {
    a = [3]f32{ 4, 5, 6 };
}
export fn entry() void {
    reassign(.{ 1, 2, 3 });
}

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