summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-24 01:10:15 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-24 01:10:51 -0800
commita555f36aad5963dc600bc0af9433c39ced49b476 (patch)
tree683b08a5dde2079b093c6c97329684895e815bf2 /test
parentfb8f4a81096140b3c35e0932d20420708a7845ef (diff)
downloadmc-a555f36aad5963dc600bc0af9433c39ced49b476.tar.gz
Fix recursive types nested inside generics.
Diffstat (limited to 'test')
-rw-r--r--test/recgeneric.myr14
-rw-r--r--test/tests1
2 files changed, 15 insertions, 0 deletions
diff --git a/test/recgeneric.myr b/test/recgeneric.myr
new file mode 100644
index 0000000..28b9fab
--- /dev/null
+++ b/test/recgeneric.myr
@@ -0,0 +1,14 @@
+use std
+
+type o(@a::integral) = union
+ `S @a
+;;
+
+type x(@k) = struct
+ n : o(x(@k)#)
+;;
+
+const main = {
+ var test : x(int)
+ std.put("built\n")
+}
diff --git a/test/tests b/test/tests
index 4f47773..f9da77c 100644
--- a/test/tests
+++ b/test/tests
@@ -94,6 +94,7 @@ B generictype E 0
B genericret E 42
B genericmatch E 15
B genericrec E 0
+B recgeneric P 'built'
# B genericchain P 'val = 123' ## BUGGERED
B genericmake P 'val = 123'
B genericuret E 42