summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-06-24 23:54:51 -0400
committerOri Bernstein <ori@eigenstate.org>2014-06-24 23:54:51 -0400
commita0450d9c08d6c0d83c8eb0d04bc382da63b36506 (patch)
treedaa7e525f5cd1e42af6012941c9fa5075f231c1a
parent70caab3b29189a6878b2a1382100dd18ba0b4ae9 (diff)
downloadmc-a0450d9c08d6c0d83c8eb0d04bc382da63b36506.tar.gz
Add borked test case for generic chaining.
-rw-r--r--test/genericchain.myr16
-rw-r--r--test/tests1
2 files changed, 17 insertions, 0 deletions
diff --git a/test/genericchain.myr b/test/genericchain.myr
new file mode 100644
index 0000000..0608cf6
--- /dev/null
+++ b/test/genericchain.myr
@@ -0,0 +1,16 @@
+use std
+
+generic fail = {val : @a
+ -> `std.Some val
+}
+
+generic try = {opt : std.option(@b)
+ match opt
+ | `std.Some v: -> v
+ | `std.None: std.die("Badness\n")
+ ;;
+}
+
+const main = {
+ std.put("val = %i\n", try(fail(123)))
+}
diff --git a/test/tests b/test/tests
index 27cf53f..e06e93a 100644
--- a/test/tests
+++ b/test/tests
@@ -84,6 +84,7 @@ B generictype E 0
B genericret E 42
B genericmatch E 15
B genericrec E 0
+# B genericchain P "val = 123" ## BUGGERED
B stdopt-some E 42
B stdopt-none E 42
B stdopt-mk E 42