Skip to content

Commit

Permalink
[typer] don't add empty import modules to com.modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Jul 11, 2023
1 parent d1ef1a3 commit 777a5b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/typing/typeloadModule.ml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ module ModuleLevel = struct
(* We use the file path as module name to make it unique. This may or may not be a good idea... *)
let m_import = make_module ctx ([],path) path p in
m_import.m_extra.m_kind <- MImport;
add_module ctx m_import p;
m_import
in
List.fold_left (fun acc path ->
Expand All @@ -310,7 +309,9 @@ module ModuleLevel = struct
| ParseError(_,(msg,p),_) -> Parser.error msg p
in
List.iter (fun (d,p) -> match d with EImport _ | EUsing _ -> () | _ -> raise_typing_error "Only import and using is allowed in import.hx files" p) r;
add_dependency m (make_import_module path r);
let m_import = make_import_module path r in
add_module ctx m_import p;
add_dependency m m_import;
r
end else begin
let r = [] in
Expand Down

0 comments on commit 777a5b9

Please sign in to comment.