File tree Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -458,21 +458,6 @@ let processLocalInclude includePath _loc ~prefix ~exact ~(env : QueryEnv.t)
458
458
|> Hashtbl. iter (fun (name , _ ) (declared : Types.type_expr Declared.t ) ->
459
459
(* We check all the values if their origin is the same as the include path. *)
460
460
match declared.modulePath with
461
- | ModulePath. ExportedModule {name = exportedName}
462
- when exportedName = includePath ->
463
- if Utils. checkName name ~prefix ~exact then
464
- if not (Hashtbl. mem localTables.namesUsed name) then (
465
- Hashtbl. add localTables.namesUsed name () ;
466
- localTables.resultRev < -
467
- {
468
- (Completion. create declared.name.txt ~env
469
- ~kind: (Value declared.item))
470
- with
471
- deprecated = declared.deprecated;
472
- docstring = declared.docstring;
473
- synthetic = true ;
474
- }
475
- :: localTables.resultRev)
476
461
| ModulePath. IncludedModule (source , _ ) ->
477
462
let source_module_path =
478
463
match Path. flatten source with
Original file line number Diff line number Diff line change @@ -25,9 +25,25 @@ let create () =
25
25
let populateValues ~env localTables =
26
26
env.QueryEnv. file.stamps
27
27
|> Stamps. iterValues (fun _ declared ->
28
- Hashtbl. replace localTables.valueTable
29
- (declared.name.txt, declared.name.loc |> Loc. start)
30
- declared)
28
+ match declared.modulePath with
29
+ | ModulePath. ExportedModule _ -> (
30
+ match
31
+ Hashtbl. find_opt localTables.valueTable
32
+ (declared.name.txt, declared.name.loc |> Loc. start)
33
+ with
34
+ | Some
35
+ {modulePath = ModulePath. IncludedModule _; name = existingName}
36
+ when declared.name.txt = existingName.txt ->
37
+ (* Don't override an included module declared item with an Exported one *)
38
+ ()
39
+ | _ ->
40
+ Hashtbl. replace localTables.valueTable
41
+ (declared.name.txt, declared.name.loc |> Loc. start)
42
+ declared)
43
+ | _ ->
44
+ Hashtbl. replace localTables.valueTable
45
+ (declared.name.txt, declared.name.loc |> Loc. start)
46
+ declared)
31
47
32
48
let populateConstructors ~env localTables =
33
49
env.QueryEnv. file.stamps
You can’t perform that action at this time.
0 commit comments