Restore some out checking.

This commit is contained in:
Christoffer Lerno
2025-09-26 21:19:38 +02:00
parent 1f49a5448e
commit 6287e8dfbf
3 changed files with 29 additions and 9 deletions

View File

@@ -5,9 +5,11 @@
*>
fn void tes2t(char* z, char[] out_data, char[] in_data) {
z[0] = 2;
z[0] += 1; // error: 'out' parameters may not be read
z[0] += 1; // #error: 'out' parameters may not be read
out_data[0] = 3;
out_data[0] *= 1; // error: 'out' parameters may not be read
out_data[0..3]; // error: 'out' parameters may not be read
out_data[0] *= 1; // #error: 'out' parameters may not be read
out_data[0..3];
out_data[0..3] = 23;
out_data[0..3] = out_data[0..3]; // #error: parameters may not be read
}