Skip to content

Commit f5f47ce

Browse files
panglesdjonludlam
authored andcommitted
Do no link twice the occurrences
Signed-off-by: Paul-Elliot <[email protected]>
1 parent 5a542c5 commit f5f47ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/xref2/link.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ and open_ env parent = function
400400
let rec unit env t =
401401
let open Compilation_unit in
402402
let content =
403-
if t.Lang.Compilation_unit.linked || t.hidden then t.content
403+
if t.hidden then t.content
404404
else
405405
match t.content with
406406
| Module sg ->
@@ -1145,7 +1145,8 @@ and type_expression : Env.t -> Id.Signature.t -> _ -> _ =
11451145
| Package p -> Package (type_expression_package env parent visited p)
11461146

11471147
let link ~filename x y =
1148-
Lookup_failures.catch_failures ~filename (fun () -> unit x y)
1148+
Lookup_failures.catch_failures ~filename (fun () ->
1149+
if y.Lang.Compilation_unit.linked then y else unit x y)
11491150

11501151
let page env page =
11511152
let () =

0 commit comments

Comments
 (0)