feat: add support for arrays

This commit is contained in:
2026-04-23 00:19:11 +02:00
parent ec2aa771fa
commit 0a74262cee
11 changed files with 512 additions and 11 deletions
+15
View File
@@ -0,0 +1,15 @@
[code]
fn swap(a: *i32, b: *i32) {
let temp = *a;
*a = *b;
*b = temp;
}
fn main() -> i32 {
let a = [10, 20];
swap(&a[0], &a[1]);
return a[0] - a[1]; // 20 - 10 = 10
}
[expected_return_code]
10