From 2f204083eea2403af681ada77e6e6484e9d0b3a4 Mon Sep 17 00:00:00 2001 From: Nicolas Cannasse Date: Tue, 28 Feb 2012 12:29:07 +0000 Subject: [PATCH] always allow unification for Expr type params (fixed issue #662) --- type.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/type.ml b/type.ml index d0d270d1085..7917b0e58b8 100644 --- a/type.ml +++ b/type.ml @@ -661,7 +661,7 @@ let rec type_eq param a b = if e1 != e2 && not (param = EqCoreType && e1.e_path = e2.e_path) then error [cannot_unify a b]; List.iter2 (type_eq param) tl1 tl2 | TInst (c1,tl1) , TInst (c2,tl2) -> - if c1 != c2 && not (param = EqCoreType && c1.cl_path = c2.cl_path) then error [cannot_unify a b]; + if c1 != c2 && not (param = EqCoreType && c1.cl_path = c2.cl_path) && (match c1.cl_kind, c2.cl_kind with KExpr _, KExpr _ -> false | _ -> true) then error [cannot_unify a b]; List.iter2 (type_eq param) tl1 tl2 | TFun (l1,r1) , TFun (l2,r2) when List.length l1 = List.length l2 -> (try