summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2001-11-05 09:04:08 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2001-11-05 09:04:08 +0000
commitfb02d3be22dc70bcda9168683d4733ce61f49fa2 (patch)
tree665a8e29798ef76935ed0cc7bf19b24c38e64848
parentac35cb1a4ec2e16151581dbee18588555005fb67 (diff)
clear type pairs as soon as possible
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3977 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--typing/ctype.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/typing/ctype.ml b/typing/ctype.ml
index dfb49f9bf..b67120cf8 100644
--- a/typing/ctype.ml
+++ b/typing/ctype.ml
@@ -2383,6 +2383,7 @@ let subtype env ty1 ty2 =
TypePairs.clear subtypes;
(* Build constraint set. *)
let cstrs = subtype_rec env [(ty1, ty2)] ty1 ty2 [] in
+ TypePairs.clear subtypes;
(* Enforce constraints. *)
function () ->
List.iter
@@ -2390,9 +2391,7 @@ let subtype env ty1 ty2 =
try unify env t1 t2 with Unify trace ->
raise (Subtype (expand_trace env (List.rev trace0),
List.tl (List.tl trace))))
- (List.rev cstrs);
- TypePairs.clear subtypes
-
+ (List.rev cstrs)
(*******************)
(* Miscellaneous *)