From 728fbc648eae4ffdde267a7d3a558bd6f61425dc Mon Sep 17 00:00:00 2001 From: Jacques Garrigue Date: Wed, 28 Sep 2005 07:18:30 +0000 Subject: [PATCH] must strengthen private row types git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- typing/mtype.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/typing/mtype.ml b/typing/mtype.ml index b7b58ae39..ac5e2424a 100644 --- a/typing/mtype.ml +++ b/typing/mtype.ml @@ -48,11 +48,12 @@ and strengthen_sig env sg p = | Tsig_type(id, decl, rs) :: rem -> let newdecl = match decl.type_manifest with - None -> + Some ty when not (Btype.has_constr_row ty) -> decl + | _ -> { decl with type_manifest = Some(Btype.newgenty(Tconstr(Pdot(p, Ident.name id, nopos), decl.type_params, ref Mnil))) } - | _ -> decl in + in Tsig_type(id, newdecl, rs) :: strengthen_sig env rem p | (Tsig_exception(id, d) as sigelt) :: rem -> sigelt :: strengthen_sig env rem p