Skip to content

Commit b02791f

Browse files
committed
#6 fixed size arrays only
1 parent c301b05 commit b02791f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tests/cases/arrays/array.lyte

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
assert(cond: bool) → void
44

5-
ret_array_literal() → [i32] {
5+
ret_array_literal() → [i32; 3] {
66
return [1,2,3]
77
}
88

@@ -13,17 +13,9 @@ test {
1313
assert(a[2] == 3)
1414
assert(a.len == 3)
1515

16-
a = [42]
16+
a = [42, 0, 0]
1717
assert(a.len == 1)
1818
assert(a[0] == 42)
1919

2020
assert([42][0] == 42)
21-
22-
var b:[i32]
23-
assert(b.len == 0)
24-
b[0] = 1
25-
assert(b.len == 1)
26-
b[1] = 2
27-
b[2] = 3
28-
assert(b.len == 3)
2921
}

0 commit comments

Comments
 (0)