summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-08-05 23:49:59 -0400
committerOri Bernstein <ori@eigenstate.org>2014-08-05 23:49:59 -0400
commit4a8b6a32bd2e06a803b203fe90b7b1253e57f362 (patch)
tree3590547f6839c10b140f90fb20aa16bf6354c84e
parent07d0605a76de266160d43c694d3378b5603a0f7a (diff)
downloadmc-4a8b6a32bd2e06a803b203fe90b7b1253e57f362.tar.gz
Add missing test file
-rw-r--r--test/genericmake.myr20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/genericmake.myr b/test/genericmake.myr
new file mode 100644
index 0000000..819dc82
--- /dev/null
+++ b/test/genericmake.myr
@@ -0,0 +1,20 @@
+use std
+
+type t(@ty) = union
+ `Some @ty
+ `None
+;;
+
+const make = {v
+ -> `Some v
+}
+
+const main = {
+ var x
+
+ x = make(123)
+ match x
+ | `std.Some v: std.put("val = %i\n", v)
+ | `std.None: std.die("Unreachable\n")
+ ;;
+}