|
@@ -1224,7 +1224,7 @@ and unify_to_field ab tl b (t,cfo) =
|
|
(* immediate constraints checking is ok here because we know there are no monomorphs *)
|
|
(* immediate constraints checking is ok here because we know there are no monomorphs *)
|
|
List.iter2 (fun m (name,t) -> match follow t with
|
|
List.iter2 (fun m (name,t) -> match follow t with
|
|
| TInst ({ cl_kind = KTypeParameter constr },_) when constr <> [] ->
|
|
| TInst ({ cl_kind = KTypeParameter constr },_) when constr <> [] ->
|
|
- List.iter (fun tc -> unify m (map tc) ) constr
|
|
|
|
|
|
+ List.iter (fun tc -> match follow m with TMono _ -> raise (Unify_error []) | _ -> unify m (map tc) ) constr
|
|
| _ -> ()
|
|
| _ -> ()
|
|
) monos cf.cf_params;
|
|
) monos cf.cf_params;
|
|
unify_func (map t) b;
|
|
unify_func (map t) b;
|