diff options
author | Jacques Garrigue <garrigue@math.nagoya-u.ac.jp> | 2015-11-30 15:17:41 +0900 |
---|---|---|
committer | Jacques Garrigue <garrigue@math.nagoya-u.ac.jp> | 2015-11-30 15:17:41 +0900 |
commit | 20b59a331859aedb343afbccb619151e864a6c4a (patch) | |
tree | 31e67cc5f84c99282727fd5a77faf6a460aa1cb1 | |
parent | 9229b15aaac89dc835662177bbb70cecfa2598d3 (diff) | |
download | ocaml-20b59a331859aedb343afbccb619151e864a6c4a.tar.gz |
Fix PR#6981
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | testsuite/tests/typing-modules-bugs/pr6981_ok.ml | 10 | ||||
-rw-r--r-- | typing/typemod.ml | 1 |
3 files changed, 12 insertions, 0 deletions
@@ -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 diff --git a/testsuite/tests/typing-modules-bugs/pr6981_ok.ml b/testsuite/tests/typing-modules-bugs/pr6981_ok.ml new file mode 100644 index 0000000000..e2b285b9d8 --- /dev/null +++ b/testsuite/tests/typing-modules-bugs/pr6981_ok.ml @@ -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 diff --git a/typing/typemod.ml b/typing/typemod.ml index 855488c609..3e2c8054a6 100644 --- a/typing/typemod.ml +++ b/typing/typemod.ml @@ -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); |