summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-01-07 00:10:17 -0800
committerOri Bernstein <ori@eigenstate.org>2019-01-07 00:10:17 -0800
commitaf63c8fc4082fca2b5148cb55a6870ac926660e4 (patch)
treefbc4a1129ed7e6c6f7de4ff0005dcc43e4c11319 /test
parenta2644d1d980e0f1c5439dce7764f0d051cf4cc41 (diff)
downloadmc-af63c8fc4082fca2b5148cb55a6870ac926660e4.tar.gz
Change indexed array literal syntax.
Diffstat (limited to 'test')
-rw-r--r--test/arraylit.myr6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/arraylit.myr b/test/arraylit.myr
index e37e772..93a90ee 100644
--- a/test/arraylit.myr
+++ b/test/arraylit.myr
@@ -2,6 +2,10 @@ use std
/* checks we can make indexed array literals. exits with 3. */
const main = {
- var a = [0: 1, 2: 3, 1: 2]
+ var a = [
+ .[0] = 1,
+ .[2] = 3,
+ .[1] = 2,
+ ]
std.exit(a[2])
}