@@ -922,7 +922,7 @@ let rec uid_of_result ~traverse_aliases = function
922922 | Approximated _ | Unresolved _ | Internal_error_missing_uid -> (None , true )
923923
924924(* * This is the main function here *)
925- let from_path ~config ~env ~local_defs ~decl path =
925+ let from_path ~config ~env ~local_defs ~decl ? ident : _ path =
926926 let title = " from_path" in
927927 let unalias (decl : Env_lookup.item ) =
928928 if not config.traverse_aliases then (path, decl.uid)
@@ -969,9 +969,12 @@ let from_path ~config ~env ~local_defs ~decl path =
969969 in
970970 (* Step 2: Uid => Location *)
971971 let loc =
972+ let ident =
973+ (* TODO it might not be useful to check the ident without impl_uid *)
974+ Path. last path
975+ in
972976 match impl_uid with
973977 | Some impl_uid ->
974- let ident = Path. last path in
975978 find_loc_of_uid ~config ~local_defs ~ident ~fallback: uid impl_uid
976979 | None -> find_loc_of_uid ~config ~local_defs uid
977980 in
@@ -1009,7 +1012,9 @@ let from_longident ~config ~env ~local_defs nss ident =
10091012 in
10101013 match Env_lookup. by_longident nss ident env with
10111014 | None -> `Not_in_env str_ident
1012- | Some (path , decl ) -> from_path ~config ~env ~local_defs ~decl path
1015+ | Some (path , decl ) ->
1016+ let ident = Longident. last ident in
1017+ from_path ~config ~env ~local_defs ~decl ~ident path
10131018
10141019let from_path ~config ~env ~local_defs ~namespace path =
10151020 File_switching. reset () ;
0 commit comments