Add micro test for recursive type def
[tiger.ml.git] / compiler / src / lib / tiger / tiger_test_cases.ml
index 3ca7bf7..8169083 100644 (file)
@@ -83,11 +83,21 @@ let micro =
         "
       in
       Test.case
-        code
+        "Incompatible records"
         ~code
         (* 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.020116 seconds and 4 git commands to generate.