diff options
author | Thomas Refis <thomas.refis@gmail.com> | 2019-08-21 11:06:54 +0100 |
---|---|---|
committer | Thomas Refis <thomas.refis@gmail.com> | 2019-08-28 12:02:01 +0100 |
commit | 9c058b626d50ce9e157d8fc66aae4b5aaee48720 (patch) | |
tree | 8f7192d1b69327150a51a643c6555d0a88cc308e | |
parent | 754fec26779be2c54dde4f92b826015a53115a37 (diff) | |
download | ocaml-enter-mod-decl.tar.gz |
typemod: lower_nongen to outer scope, not to scope - 1enter-mod-decl
-rw-r--r-- | typing/typemod.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/typing/typemod.ml b/typing/typemod.ml index 229bd005ae..260ec22751 100644 --- a/typing/typemod.ml +++ b/typing/typemod.ml @@ -2074,6 +2074,7 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope = | Pstr_module {pmb_name = name; pmb_expr = smodl; pmb_attributes = attrs; pmb_loc; } -> + let outer_scope = Ctype.get_current_level () in let scope = Ctype.create_scope () in let modl = Builtin_attributes.warning_scope attrs @@ -2094,7 +2095,7 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope = } in (*prerr_endline (Ident.unique_toplevel_name id);*) - Mtype.lower_nongen (scope - 1) md.md_type; + Mtype.lower_nongen outer_scope md.md_type; let id, newenv = Env.enter_module_declaration ~scope name.txt pres md env in |