Sema: add source location to coerce result ptr, fix negation error
This commit is contained in:
committed by
Jakub Konka
parent
979910dc38
commit
cc3336c784
12
test/cases/compile_errors/reassign_to_array_parameter.zig
Normal file
12
test/cases/compile_errors/reassign_to_array_parameter.zig
Normal file
@@ -0,0 +1,12 @@
|
||||
fn reassign(a: [3]f32) void {
|
||||
a = [3]f32{4, 5, 6};
|
||||
}
|
||||
export fn entry() void {
|
||||
reassign(.{1, 2, 3});
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:15: error: cannot assign to constant
|
||||
Reference in New Issue
Block a user