Răsfoiți Sursa

minor fix wrt inlining and recursiveness

Nicolas Cannasse 13 ani în urmă
părinte
comite
b8b0f6102d
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      typer.ml

+ 6 - 1
typer.ml

@@ -472,7 +472,12 @@ let make_call ctx e params t p =
 				raise Exit;
 				raise Exit;
 			| Some e -> e)
 			| Some e -> e)
 		| _ ->
 		| _ ->
-			error "Recursive inline is not supported" p)
+			(*
+				we can't inline because there is most likely a loop in the typing.
+				this can be caused by mutually recursive vars/functions, some of them
+				being inlined or not. In that case simply ignore inlining.
+			*)
+			raise Exit)
 	with Exit ->
 	with Exit ->
 		mk (TCall (e,params)) t p
 		mk (TCall (e,params)) t p