summaryrefslogtreecommitdiff
path: root/test/matcharray.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-10-21 21:37:23 -0400
committerOri Bernstein <ori@eigenstate.org>2013-10-21 21:37:23 -0400
commitc3955db0543c35b4adb822f5beca686e8c3726ef (patch)
treeafcb56c050f63de5661a63eea41b7b8970fd1527 /test/matcharray.myr
parentf1383ff55a560228d15cf59dabba30dee3e3daeb (diff)
downloadmc-c3955db0543c35b4adb822f5beca686e8c3726ef.tar.gz
Add tests for the new match types
Diffstat (limited to 'test/matcharray.myr')
-rw-r--r--test/matcharray.myr13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/matcharray.myr b/test/matcharray.myr
new file mode 100644
index 0000000..67e8efe
--- /dev/null
+++ b/test/matcharray.myr
@@ -0,0 +1,13 @@
+use std
+
+const main = {
+ var v = [2, 40, 10]
+
+ match v
+ [x, y, 10]:
+ -> x + y
+ ;;
+ _: std.die("Wat");;
+ ;;
+ -> 0
+}