瀏覽代碼

[typer] don't paint entire files red on invalid package errors

Simon Krajewski 6 年之前
父節點
當前提交
25cae7b07d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/typing/typeloadParse.ml

+ 1 - 1
src/typing/typeloadParse.ml

@@ -175,7 +175,7 @@ let parse_module ctx m p =
 		if p == null_pos then
 			display_error ctx ("Invalid commandline class : " ^ s_type_path m ^ " should be " ^ s_type_path (pack,snd m)) p
 		else
-			display_error ctx ("Invalid package : " ^ spack (fst m) ^ " should be " ^ spack pack) p
+			display_error ctx ("Invalid package : " ^ spack (fst m) ^ " should be " ^ spack pack) {p with pmax = p.pmin}
 	end;
 	file, if !remap <> fst m then
 		(* build typedefs to redirect to real package *)