Fix PR#6981

master
Jacques Garrigue 2015-11-30 15:17:41 +09:00
parent 9229b15aaa
commit 20b59a3318
3 changed files with 12 additions and 0 deletions

View File

@ -294,6 +294,7 @@ Bug fixes:
- PR#6972, GPR#276: 4.02.3 regression on documentation comments in .cmt files
(Leo White, report by Olivier Andrieu)
- PR#6980: Assert failure from polymorphic variants and existentials
- PR#6981: Ctype.Unify(_) with associated functor arg refering to previous one
- PR#6982: unexpected type error when packing a module alias
- PR#6985: `module type of struct include Bar end exposes
%s#row when Bar contains private row types

View File

@ -0,0 +1,10 @@
module type S =
sig
type a
type b
end
module Foo
(Bar : S with type a = private [> `A])
(Baz : S with type b = private < b : Bar.b ; .. >) =
struct
end

View File

@ -1104,6 +1104,7 @@ let rec type_module ?(alias=false) sttn funct_body anchor env smod =
let (id, newenv), funct_body =
match ty_arg with None -> (Ident.create "*", env), false
| Some mty -> Env.enter_module ~arg:true name.txt mty env, true in
Ctype.init_def(Ident.current_time()); (* PR#6981 *)
let body = type_module sttn funct_body None newenv sbody in
rm { mod_desc = Tmod_functor(id, name, mty, body);
mod_type = Mty_functor(id, ty_arg, body.mod_type);