瀏覽代碼

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

Simon Krajewski 12 年之前
父節點
當前提交
e72588bf8e
共有 1 個文件被更改,包括 6 次插入4 次删除
  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