summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-01-17 01:35:23 -0500
committerOri Bernstein <ori@eigenstate.org>2013-01-17 01:35:23 -0500
commit0500ef75d99bab9efd7932a9361ad3bebcb524b2 (patch)
tree681d0b9cc70eebf6c9a571297496bc8cd04996e1 /test
parent9f7256a2c8174fc94b8ceafa13b0a7960083edc1 (diff)
downloadmc-0500ef75d99bab9efd7932a9361ad3bebcb524b2.tar.gz
Add missing file.
Diffstat (limited to 'test')
-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
+}