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

@@ -1,9 +1,11 @@
export fn foo() void {
var ptr: [*]u8 = undefined;
_ = &ptr;
@memset(ptr, 123);
}
export fn bar() void {
var ptr: [*c]bool = undefined;
_ = &ptr;
@memset(ptr, true);
}
@@ -11,7 +13,7 @@ export fn bar() void {
// backend=stage2
// target=native
//
// :3:5: error: unknown @memset length
// :3:13: note: destination type '[*]u8' provides no length
// :7:5: error: unknown @memset length
// :7:13: note: destination type '[*c]bool' provides no length
// :4:5: error: unknown @memset length
// :4:13: note: destination type '[*]u8' provides no length
// :9:5: error: unknown @memset length
// :9:13: note: destination type '[*c]bool' provides no length