summaryrefslogtreecommitdiff
path: root/test/generictype.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-09-04 21:31:20 -0400
committerOri Bernstein <ori@eigenstate.org>2012-09-04 21:31:20 -0400
commit2fd95d13dd25d9ce05f67853c009b4dca51a6881 (patch)
tree90a70f85bce890d90a8d268b95dda93beeb17014 /test/generictype.myr
parent1c153ec3a6bd033113f5633a2fa1c89df2c36068 (diff)
downloadmc-2fd95d13dd25d9ce05f67853c009b4dca51a6881.tar.gz
Add missing tests.
Diffstat (limited to 'test/generictype.myr')
-rw-r--r--test/generictype.myr15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/generictype.myr b/test/generictype.myr
new file mode 100644
index 0000000..4d33c33
--- /dev/null
+++ b/test/generictype.myr
@@ -0,0 +1,15 @@
+type option(@a) = union
+ `Some @a
+ `None
+;;
+
+const main = {
+ var v
+
+ v = `Some 123
+ match v
+ `None: -> 1;;
+ `Some 123: -> 0;;
+ ;;
+ -> 60
+}