summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-15 00:20:39 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-15 00:20:39 -0800
commit3aec3caf0f75feec908fca6e387e7d50ae208d33 (patch)
treeec8428315f7ca6f7b4970b4ea25ddf708e419699 /test
parent994b042eac3300dd62bbbc7dedbb6d9a0b525638 (diff)
downloadmc-3aec3caf0f75feec908fca6e387e7d50ae208d33.tar.gz
Fix matching void union args.
We no longer segfault! Whee!
Diffstat (limited to 'test')
-rw-r--r--test/tests1
-rw-r--r--test/voidmatch.myr8
2 files changed, 9 insertions, 0 deletions
diff --git a/test/tests b/test/tests
index 4db9cda..192b67d 100644
--- a/test/tests
+++ b/test/tests
@@ -106,6 +106,7 @@ B matchtup E 42
B matchstruct E 42
B matcharray E 42
B matchargunion E 69
+B matchvoid E 'ok'
B matchexhaust P worked
B matchargstr C
B matchunion_sl P foo
diff --git a/test/voidmatch.myr b/test/voidmatch.myr
new file mode 100644
index 0000000..a458a6e
--- /dev/null
+++ b/test/voidmatch.myr
@@ -0,0 +1,8 @@
+use std
+
+const main = {
+ match `std.Some void
+ | `std.Some x: std.put("ok\n")
+ | `std.None: std.put("fail\n")
+ ;;
+}