test: update cases to silence 'var is never mutated' errors

This commit is contained in:
mlugg
2023-11-11 07:27:31 +00:00
parent 2c1acb6180
commit 21fa187abc
289 changed files with 671 additions and 489 deletions

View File

@@ -11,6 +11,7 @@ export fn entry() void {
var a = A{ .a = 2, .b = 2 };
var b = B{ .q = 22, .a = 3, .b = 2 };
var t: usize = 0;
_ = &t;
const ptr = switch (t) {
0 => &a.a,
1 => &b.a,
@@ -24,6 +25,6 @@ export fn entry() void {
// backend=stage2
// target=native
//
// :14:17: error: incompatible types: '*align(1:0:1) u2' and '*align(2:8:2) u2'
// :15:14: note: type '*align(1:0:1) u2' here
// :16:14: note: type '*align(2:8:2) u2' here
// :15:17: error: incompatible types: '*align(1:0:1) u2' and '*align(2:8:2) u2'
// :16:14: note: type '*align(1:0:1) u2' here
// :17:14: note: type '*align(2:8:2) u2' here