diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2003-05-13 04:11:03 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2003-05-13 04:11:03 +0000 |
commit | 7f8529a455425d86bcc6a8f8d402bee40f3bf069 (patch) | |
tree | 7b0b8a7c50bf62c0dea4050a5c59780992d0997a | |
parent | d5f11dbd7cff3daf0f083be127e6444e82fcba33 (diff) |
finish? fixing PR#1673
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | typing/ctype.ml | 2 | ||||
-rw-r--r-- | typing/subst.ml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/typing/ctype.ml b/typing/ctype.ml index 78f71f1c6..ab6e13927 100644 --- a/typing/ctype.ml +++ b/typing/ctype.ml @@ -761,7 +761,7 @@ let rec copy ty = let more = repr row.row_more in (* We must substitute in a subtle way *) begin match more.desc with - Tsubst ({desc=Tvariant _} as ty2) -> + Tsubst ty2 when (repr ty2).desc <> Tunivar -> (* This variant type has been already copied *) ty.desc <- Tsubst ty2; (* avoid Tlink in the new type *) Tlink ty2 diff --git a/typing/subst.ml b/typing/subst.ml index 99e6d7634..822587795 100644 --- a/typing/subst.ml +++ b/typing/subst.ml @@ -99,7 +99,7 @@ let rec typexp s ty = let more = repr row.row_more in (* We must substitute in a subtle way *) begin match more.desc with - Tsubst ({desc=Tvariant _} as ty2) -> + Tsubst ty2 when (repr ty2).desc <> Tunivar -> (* This variant type has been already copied *) ty.desc <- Tsubst ty2; (* avoid Tlink in the new type *) Tlink ty2 |