summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/genericrec.myr11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/genericrec.myr b/test/genericrec.myr
new file mode 100644
index 0000000..e280f00
--- /dev/null
+++ b/test/genericrec.myr
@@ -0,0 +1,11 @@
+/* test that generic types can be recursive, as long as they're not self
+ * including. This just needs to compile and exit with 0. */
+type list(@t) = struct
+ val : @t
+ next : list(@t)*
+;;
+
+const main = {
+ var v : list(int)
+ -> 0
+}