Explorar o código

allow unification of monomorphs with Dynamic<T> (fixed issue #1416)

Simon Krajewski %!s(int64=12) %!d(string=hai) anos
pai
achega
e72588bf8e
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      type.ml

+ 6 - 4
type.ml

@@ -675,10 +675,12 @@ let rec link e a b =
 	(* tell is already a ~= b *)
 	if loop b then
 		(follow b) == a
-	else
-		match b with
-		| TDynamic _ -> true
-		| _ -> e := Some b; true
+	else if b == t_dynamic then
+		true
+	else begin
+		e := Some b;
+		true
+	end
 
 let monomorphs eparams t =
 	apply_params eparams (List.map (fun _ -> mk_mono()) eparams) t