Init new repository

This commit is contained in:
Krzosa Karol
2024-04-13 15:29:53 +02:00
commit 5a2e3dcec4
335 changed files with 61571 additions and 0 deletions

21
tests/defer_order.txt Normal file
View File

@@ -0,0 +1,21 @@
i := 0;
a: [4]int;
test :: proc() {
defer {a[i] = 1; i += 1;}
defer {a[i] = 2; i += 1;}
defer {a[i] = 3; i += 1;}
defer {a[i] = 4; i += 1;}
}
main :: proc(): int {
test();
i1 := a[0] == 4;
i2 := a[1] == 3;
i3 := a[2] == 2;
i4 := a[3] == 1;
result := i1 + i2 + i3 + i4;
result -= 4;
return :int(result);
}