test: update cases to silence 'var is never mutated' errors
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user