Browse Source

fix import.hx diagnostics condition (closes #6382)

Simon Krajewski 8 năm trước cách đây
mục cha
commit
d0fd42b030
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/typing/typeload.ml

+ 1 - 1
src/typing/typeload.ml

@@ -2951,7 +2951,7 @@ let init_module_type ctx context_init do_init (decl,p) =
 	in
 	let check_path_display path p = match ctx.com.display.dms_kind with
 		(* We cannot use ctx.is_display_file because the import could come from an import.hx file. *)
-		| DMDiagnostics b when (b && not (ExtString.String.ends_with p.pfile "import.hx")) || Display.is_display_file p.pfile ->
+		| DMDiagnostics b when (b || Display.is_display_file p.pfile) && not (ExtString.String.ends_with p.pfile "import.hx") ->
 			Display.ImportHandling.add_import_position ctx.com p path;
 		| DMStatistics | DMUsage _ ->
 			Display.ImportHandling.add_import_position ctx.com p path;