fix PR#5469

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12005 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2012-01-10 03:01:50 +00:00
parent d02419cef7
commit db50558e33
3 changed files with 11 additions and 3 deletions

View File

@ -54,7 +54,7 @@ Bug Fixes:
- PR#5436: update object ids on unmarshaling
- PR#5453: configure doesn't find X11 under Ubuntu/MultiarchSpec
- emacs mode: colorization of comments and strings now works correctly
- PR#5469: private record type generated by functor loses abbreviation
Feature wishes:
- PR#352: new option "-stdin" to make ocaml read stdin as a script
- PR#5358: first class modules don't allow "with type" declarations for types

View File

@ -0,0 +1,7 @@
module M (T:sig type t end)
= struct type t = private { t : T.t } end
module P
= struct
module T = struct type t end
module R = M(T)
end

View File

@ -48,8 +48,9 @@ and strengthen_sig env sg p =
sigelt :: strengthen_sig env rem p
| Tsig_type(id, decl, rs) :: rem ->
let newdecl =
match decl.type_manifest with
Some ty when decl.type_private = Public -> decl
match decl.type_manifest, decl.type_private, decl.type_kind with
Some _, Public, _ -> decl
| Some _, Private, (Type_record _ | Type_variant _) -> decl
| _ ->
let manif =
Some(Btype.newgenty(Tconstr(Pdot(p, Ident.name id, nopos),