This is all of the expected 0.14.0 progress on #21530, which can now be postponed once this commit is merged. This required rewriting the (un)wrap operations since the original implementations were extremely buggy. Also adds an easy way to retrigger Sema OPV bugs so that I don't have to keep updating #22419 all the time.
13 lines
204 B
Zig
13 lines
204 B
Zig
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:5: error: cannot assign to constant
|