Add micro test for recursive type def
[tiger.ml.git] / compiler / src / lib / tiger / tiger_test_cases.ml
index 45a4e1d..8169083 100644 (file)
@@ -88,6 +88,16 @@ let micro =
         (* TODO: Be more specific *)
         ~is_error_expected_semant:(Some Error.is_wrong_type)
     )
+  ; ( Test.case
+        "Recursive type def: int list"
+        ~code:"\
+          let \n\
+            type intlist = {hd: int, tl: intlist} \n\
+            var lst : intlist := intlist {hd=0, tl = nil} \n\
+          in \n\
+            lst \n\
+          end"
+    )
   ]
 
 let book ~dir =
This page took 0.024656 seconds and 4 git commands to generate.