ref: a0450d9c08d6c0d83c8eb0d04bc382da63b36506
parent: 70caab3b29189a6878b2a1382100dd18ba0b4ae9
author: Ori Bernstein <[email protected]>
date: Tue Jun 24 19:54:51 EDT 2014
Add borked test case for generic chaining.
--- /dev/null
+++ b/test/genericchain.myr
@@ -1,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)))
+}
--- a/test/tests
+++ b/test/tests
@@ -84,6 +84,7 @@
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