@@ -913,7 +913,8 @@ let solve_constructor_annotation
913913 new_local_type ~loc: name.loc Definition
914914 ~manifest_and_scope: (tv, Ident. lowest_scope) in
915915 let (id, new_env) =
916- Env. enter_type ~scope: expansion_scope name.txt decl !! penv in
916+ (* These redundant types should not be added to the shortpath graph *)
917+ Env. enter_type ~long_path: true ~scope: expansion_scope name.txt decl !! penv in
917918 Pattern_env. set_env penv new_env;
918919 ({name with txt = id}, (decl, tv)))
919920 name_list
@@ -951,7 +952,7 @@ let solve_constructor_annotation
951952 Tconstr (Path. Pident id , [] , _ ) when List. mem_assoc id rem ->
952953 let decl, tv' = List. assoc id ids_decls in
953954 let env =
954- Env. add_type_long_path ~check: false id
955+ Env. add_type ~check: false id
955956 {decl with type_manifest = None } !! penv
956957 in
957958 Pattern_env. set_env penv env;
@@ -987,8 +988,7 @@ let solve_constructor_annotation
987988 (Bind_non_locally_abstract , id, tv')));
988989 end ;
989990 let env =
990- (* These redundant types should not be added to the shortpath graph *)
991- Env. add_type_long_path ~check: false id
991+ Env. add_type ~check: false id
992992 {decl with type_manifest = Some (duplicate_type tv')} !! penv
993993 in
994994 Pattern_env. set_env penv env)
0 commit comments