Pārlūkot izejas kodu

don't allow monomorph link Dynamic.

Nicolas Cannasse 19 gadi atpakaļ
vecāks
revīzija
97e2cc5903
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      type.ml

+ 4 - 4
type.ml

@@ -254,10 +254,10 @@ let rec link e a b =
 	in
 	if loop b then
 		false
-	else begin
-		e := Some b;
-		true
-	end
+	else
+		match b with
+		| TDynamic _ -> true
+		| _ -> e := Some b; true
 
 (* substitute parameters with other types *)
 let apply_params cparams params t =