File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
middle_end/flambda/types/env Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -771,8 +771,17 @@ let mem ?min_name_mode t name =
771
771
~symbol: (fun sym ->
772
772
(* CR mshinwell: This might not take account of symbols in missing
773
773
.cmx files *)
774
- Symbol.Set. mem sym t.defined_symbols
775
- || Name.Set. mem name (t.get_imported_names () ))
774
+ let comp_unit = Symbol. compilation_unit sym in
775
+ if Compilation_unit. equal comp_unit (Compilation_unit. get_current_exn () )
776
+ then
777
+ Symbol.Set. mem sym t.defined_symbols
778
+ else
779
+ match (resolver t) comp_unit with
780
+ | None ->
781
+ (* The cmx is unavailable, but the symbol is valid *)
782
+ true
783
+ | Some _ ->
784
+ Name.Set. mem name (t.get_imported_names () ))
776
785
777
786
let mem_simple ?min_name_mode t simple =
778
787
Simple. pattern_match simple
You can’t perform that action at this time.
0 commit comments