Sfoglia il codice sorgente

Add "..." prefix to complementary error messages (#9651)

* add "..." prefix to complementary error messages

* update tests

* Error.compl_msg

* update tests
Aleksandr Kuzmenko 5 anni fa
parent
commit
dc02930e68
70 ha cambiato i file con 146 aggiunte e 134 eliminazioni
  1. 1 1
      src/compiler/haxe.ml
  2. 8 1
      src/context/common.ml
  3. 1 1
      src/context/typecore.ml
  4. 6 1
      src/core/error.ml
  5. 1 1
      src/optimization/analyzerTexpr.ml
  6. 1 1
      src/optimization/inlineConstructors.ml
  7. 1 1
      src/optimization/optimizer.ml
  8. 2 2
      src/typing/calls.ml
  9. 3 3
      src/typing/typeload.ml
  10. 5 5
      src/typing/typeloadCheck.ml
  11. 4 4
      src/typing/typeloadFields.ml
  12. 1 1
      src/typing/typeloadModule.ml
  13. 1 1
      src/typing/typer.ml
  14. 2 2
      tests/misc/compiler_loops/projects/Issue5189/compile-fail.hxml.stderr
  15. 3 3
      tests/misc/java/projects/Issue2689/compile-fail.hxml.stderr
  16. 1 1
      tests/misc/projects/Issue1310/compile1-fail.hxml.stderr
  17. 1 1
      tests/misc/projects/Issue2148/compile1-fail.hxml.stderr
  18. 1 1
      tests/misc/projects/Issue2232/compile1-fail.hxml.stderr
  19. 2 2
      tests/misc/projects/Issue2472/compile-fail.hxml.stderr
  20. 4 4
      tests/misc/projects/Issue2969/compile-fail.hxml.stderr
  21. 4 4
      tests/misc/projects/Issue3361/compile1-fail.hxml.stderr
  22. 4 4
      tests/misc/projects/Issue3361/compile2-fail.hxml.stderr
  23. 2 2
      tests/misc/projects/Issue3417/compile-fail.hxml.stderr
  24. 2 2
      tests/misc/projects/Issue3781/compile-fail.hxml.stderr
  25. 1 1
      tests/misc/projects/Issue3975/compile-fail.hxml.stderr
  26. 2 2
      tests/misc/projects/Issue4250/compile-fail.hxml.stderr
  27. 1 1
      tests/misc/projects/Issue4364/compile-fail.hxml.stderr
  28. 4 4
      tests/misc/projects/Issue4378/compile-fail.hxml.stderr
  29. 1 1
      tests/misc/projects/Issue4540/compile-fail.hxml.stderr
  30. 2 2
      tests/misc/projects/Issue4775/compile1-fail.hxml.stderr
  31. 2 2
      tests/misc/projects/Issue4803/compile-fail.hxml.stderr
  32. 2 2
      tests/misc/projects/Issue5206/compile-fail.hxml.stderr
  33. 1 1
      tests/misc/projects/Issue5644/compile-fail.hxml.stderr
  34. 6 6
      tests/misc/projects/Issue5946/compile-fail.hxml.stderr
  35. 2 2
      tests/misc/projects/Issue5949/compile-fail.hxml.stderr
  36. 4 4
      tests/misc/projects/Issue6065/compile-fail.hxml.stderr
  37. 1 1
      tests/misc/projects/Issue6714/compile-fail.hxml.stderr
  38. 2 2
      tests/misc/projects/Issue6757/compile-fail.hxml.stderr
  39. 1 1
      tests/misc/projects/Issue6790/compile-fail.hxml.stderr
  40. 1 1
      tests/misc/projects/Issue6796/compile-fail.hxml.stderr
  41. 6 6
      tests/misc/projects/Issue6810/compile-fail.hxml.stderr
  42. 1 1
      tests/misc/projects/Issue6826/compile-fail.hxml.stderr
  43. 1 1
      tests/misc/projects/Issue6878/compile-fail.hxml.stderr
  44. 2 2
      tests/misc/projects/Issue6878/compile1-fail.hxml.stderr
  45. 2 2
      tests/misc/projects/Issue7039/compile-fail.hxml.stderr
  46. 2 2
      tests/misc/projects/Issue7227/compile-fail.hxml.stderr
  47. 2 2
      tests/misc/projects/Issue7526/compile-fail.hxml.stderr
  48. 1 1
      tests/misc/projects/Issue7614/compile-fail.hxml.stderr
  49. 1 1
      tests/misc/projects/Issue7655/compile-fail.hxml.stderr
  50. 1 1
      tests/misc/projects/Issue7968/compile-fail.hxml.stderr
  51. 1 1
      tests/misc/projects/Issue7997/compile-fail.hxml.stderr
  52. 1 1
      tests/misc/projects/Issue8283/compile-fail.hxml.stderr
  53. 1 1
      tests/misc/projects/Issue8488/compile-fail.hxml.stderr
  54. 1 1
      tests/misc/projects/Issue8517/compile-fail.hxml.stderr
  55. 1 1
      tests/misc/projects/Issue8618/compile-fail.hxml.stderr
  56. 1 1
      tests/misc/projects/Issue8618/compile2-fail.hxml.stderr
  57. 1 1
      tests/misc/projects/Issue8618/compile3-fail.hxml.stderr
  58. 1 1
      tests/misc/projects/Issue8618/compile4-fail.hxml.stderr
  59. 1 1
      tests/misc/projects/Issue8704/compile-fail.hxml.stderr
  60. 2 2
      tests/misc/projects/Issue8787/compile1-fail.hxml.stderr
  61. 2 2
      tests/misc/projects/Issue8787/compile2-fail.hxml.stderr
  62. 1 1
      tests/misc/projects/Issue8819/compile-fail.hxml.stderr
  63. 4 4
      tests/misc/projects/Issue9010/NativeMeta-fail.hxml.stderr
  64. 1 1
      tests/misc/projects/Issue9017/compile-fail.hxml.stderr
  65. 2 2
      tests/misc/projects/Issue9556/compile-fail.hxml.stderr
  66. 1 1
      tests/misc/projects/Issue9631/compile-fields-fail.hxml.stderr
  67. 1 1
      tests/misc/projects/Issue9631/compile-types-fail.hxml.stderr
  68. 2 2
      tests/misc/projects/issue5002/compile-fail.hxml.stderr
  69. 7 7
      tests/misc/projects/issue5002/compile2-fail.hxml.stderr
  70. 1 1
      tests/misc/resolution/projects/modulestatics/compile-duplicate-fail.hxml.stderr

+ 1 - 1
src/compiler/haxe.ml

@@ -1098,7 +1098,7 @@ with
 			ctx.messages <- [];
 		end else begin
 			error ctx (Printf.sprintf "You cannot access the %s package while %s (for %s)" pack (if pf = "macro" then "in a macro" else "targeting " ^ pf) (s_type_path m) ) p;
-			List.iter (error ctx "    referenced here") (List.rev pl);
+			List.iter (error ctx (Error.compl_msg "referenced here")) (List.rev pl);
 		end
 	| Error.Error (m,p) ->
 		error ctx (Error.error_msg m) p

+ 8 - 1
src/context/common.ml

@@ -61,7 +61,14 @@ let compiler_message_string msg =
 	else begin
 		let error_printer file line = Printf.sprintf "%s:%d:" file line in
 		let epos = Lexer.get_error_pos error_printer p in
-		let str = String.concat ("\n" ^ epos ^ " : ") (ExtString.String.nsplit str "\n") in
+		let str =
+			let lines =
+				match (ExtString.String.nsplit str "\n") with
+				| first :: rest -> first :: List.map Error.compl_msg rest
+				| l -> l
+			in
+			String.concat ("\n" ^ epos ^ " : ") lines
+		in
 		Printf.sprintf "%s : %s" epos str
 	end
 

+ 1 - 1
src/context/typecore.ml

@@ -225,7 +225,7 @@ let add_local ctx k n t p =
 			(* ignore std lib *)
 			if not (List.exists (ExtLib.String.starts_with p.pfile) ctx.com.std_path) then begin
 				ctx.com.warning "This variable shadows a previously declared variable" p;
-				ctx.com.warning "Previous variable was here" v'.v_pos
+				ctx.com.warning (compl_msg "Previous variable was here") v'.v_pos
 			end
 		with Not_found ->
 			()

+ 6 - 1
src/core/error.ml

@@ -38,6 +38,11 @@ let short_type ctx t =
 	let tstr = s_type ctx t in
 	if String.length tstr > 150 then String.sub tstr 0 147 ^ "..." else tstr
 
+(**
+	Should be called for each complementary error message.
+*)
+let compl_msg s = "... " ^ s
+
 let unify_error_msg ctx err = match err with
 	| Cannot_unify (t1,t2) ->
 		s_type ctx t1 ^ " should be " ^ s_type ctx t2
@@ -259,7 +264,7 @@ module BetterErrors = struct
 			String.concat "\n" (List.rev_map (unify_error_msg ctx) access.acc_messages)
 		| Some access_next ->
 			let slhs,srhs = loop access_next access  in
-			Printf.sprintf "error: %s\n have: %s\n want: %s" (Buffer.contents message_buffer) slhs srhs
+			Printf.sprintf "error: %s\nhave: %s\nwant: %s" (Buffer.contents message_buffer) slhs srhs
 end
 
 let rec error_msg = function

+ 1 - 1
src/optimization/analyzerTexpr.ml

@@ -1179,7 +1179,7 @@ module Purity = struct
 					apply_to_class com c
 				with Purity_conflict(impure,p) ->
 					com.error "Impure field overrides/implements field which was explicitly marked as @:pure" impure.pn_field.cf_pos;
-					Error.error "Pure field is here" p;
+					Error.error (Error.compl_msg "Pure field is here") p;
 				end
 			| _ -> ()
 		) com.types;

+ 1 - 1
src/optimization/inlineConstructors.ml

@@ -99,7 +99,7 @@ let inline_constructors ctx e =
 				List.iter (fun v -> if v.v_id < 0 then cancel_v v p) vars;
 				if isextern then begin
 					display_error ctx "Forced inline constructor could not be inlined" io.io_pos;
-					display_error ctx "Cancellation happened here" p;
+					display_error ctx (compl_msg "Cancellation happened here") p;
 				end
 			| _ -> ()
 		end

+ 1 - 1
src/optimization/optimizer.ml

@@ -412,7 +412,7 @@ let inline_constructors ctx e =
 			begin match ii.ii_kind with
 				| IKCtor(cf,true) ->
 					display_error ctx "Extern constructor could not be inlined" p;
-					error "Variable is used here" p;
+					error (compl_msg "Variable is used here") p;
 				| _ ->
 					()
 			end;

+ 2 - 2
src/typing/calls.ml

@@ -391,7 +391,7 @@ let type_generic_function ctx (e,fa) el ?(using_param=None) with_type p =
 			unify_raise ctx tcf t p
 		with Error(Unify _,_) as err ->
 			display_error ctx ("Cannot create field " ^ name ^ " due to type mismatch") p;
-			display_error ctx "Conflicting field was defined here" pcf;
+			display_error ctx (compl_msg "Conflicting field was defined here") pcf;
 			raise err
 		in
 		let c, cf2 = try
@@ -701,7 +701,7 @@ let rec build_call ?(mode=MGet) ctx acc el (with_type:WithType.t) p =
 				TypeloadFields.locate_macro_error := false;
 				old ctx msg ep;
 				TypeloadFields.locate_macro_error := true;
-				ctx.com.error "Called from macro here" p;
+				ctx.com.error (compl_msg "Called from macro here") p;
 			end else
 				old ctx msg ep;
 		);

+ 3 - 3
src/typing/typeload.ml

@@ -59,7 +59,7 @@ let check_field_access ctx cff =
 				let _,p2 = List.find (fun (access',_) -> access = access') acc in
 				if p1 <> null_pos && p2 <> null_pos then begin
 					display_error ctx (Printf.sprintf "Duplicate access modifier %s" (Ast.s_access access)) p1;
-					display_error ctx "Previously defined here" p2;
+					display_error ctx (compl_msg "Previously defined here") p2;
 				end;
 				loop p1 acc l
 			with Not_found -> match access with
@@ -67,7 +67,7 @@ let check_field_access ctx cff =
 					begin try
 						let _,p2 = List.find (fun (access',_) -> match access' with APublic | APrivate -> true | _ -> false) acc in
 						display_error ctx (Printf.sprintf "Conflicting access modifier %s" (Ast.s_access access)) p1;
-						display_error ctx "Conflicts with this" p2;
+						display_error ctx (compl_msg "Conflicts with this") p2;
 						loop p1 acc l
 					with Not_found ->
 						loop p1 ((access,p1) :: acc) l
@@ -667,7 +667,7 @@ and init_meta_overloads ctx co cf =
 			ctx.type_params <- old;
 			false
 		| (Meta.Overload,[],_) when ctx.com.config.pf_overload ->
-			let topt (n,_,t) = match t with | TMono t when t.tm_type = None -> error ("Explicit type required for overload functions\nFor function argument '" ^ n ^ "'") cf.cf_pos | _ -> () in
+			let topt (n,_,t) = match t with | TMono t when t.tm_type = None -> error ("Explicit type required for overload functions\n... For function argument '" ^ n ^ "'") cf.cf_pos | _ -> () in
 			(match follow cf.cf_type with
 			| TFun (args,_) -> List.iter topt args
 			| _ -> () (* could be a variable *));

+ 5 - 5
src/typing/typeloadCheck.ml

@@ -151,7 +151,7 @@ let get_native_name meta =
 let check_native_name_override ctx child base =
 	let error base_pos child_pos =
 		display_error ctx ("Field " ^ child.cf_name ^ " has different @:native value than in superclass") child_pos;
-		display_error ctx ("Base field is defined here") base_pos
+		display_error ctx (compl_msg "Base field is defined here") base_pos
 	in
 	try
 		let child_name, child_pos = get_native_name child.cf_meta in
@@ -201,8 +201,8 @@ let check_overriding ctx c f =
 			with
 				Unify_error l ->
 					display_error ctx ("Field " ^ i ^ " overrides parent class with different or incomplete type") p;
-					display_error ctx ("Base field is defined here") f2.cf_name_pos;
-					display_error ctx (error_msg (Unify l)) p;
+					display_error ctx (compl_msg "Base field is defined here") f2.cf_name_pos;
+					display_error ctx (compl_msg (error_msg (Unify l))) p;
 		with
 			Not_found ->
 				if has_class_field_flag f CfOverride then
@@ -372,8 +372,8 @@ module Inheritance = struct
 					Unify_error l ->
 						if not (Meta.has Meta.CsNative c.cl_meta && c.cl_extern) then begin
 							display_error ctx ("Field " ^ i ^ " has different type than in " ^ s_type_path intf.cl_path) p;
-							display_error ctx ("Interface field is defined here") f.cf_pos;
-							display_error ctx (error_msg (Unify l)) p;
+							display_error ctx (compl_msg "Interface field is defined here") f.cf_pos;
+							display_error ctx (compl_msg (error_msg (Unify l))) p;
 						end
 			with
 				| Not_found when not c.cl_interface ->

+ 4 - 4
src/typing/typeloadFields.ml

@@ -514,7 +514,7 @@ let create_class_context ctx c context_init p =
 			ctx.com.error msg ep;
 			(* macros expressions might reference other code, let's recall which class we are actually compiling *)
 			let open TFunctions in
-			if !locate_macro_error && (is_pos_outside_class c ep) && not (is_module_fields_class c) then ctx.com.error "Defined in this class" c.cl_pos
+			if !locate_macro_error && (is_pos_outside_class c ep) && not (is_module_fields_class c) then ctx.com.error (compl_msg "Defined in this class") c.cl_pos
 		);
 	} in
 	(* a lib type will skip most checks *)
@@ -1285,7 +1285,7 @@ let create_property (ctx,cctx,fctx) c f (get,set,t,eo) p =
 			(match f2.cf_kind with
 				| Method MethMacro ->
 					display_error ctx (f2.cf_name ^ ": Macro methods cannot be used as property accessor") p;
-					display_error ctx (f2.cf_name ^ ": Accessor method is here") f2.cf_pos;
+					display_error ctx (compl_msg (f2.cf_name ^ ": Accessor method is here")) f2.cf_pos;
 				| _ -> ());
 			unify_raise ctx t2 t f2.cf_pos;
 			if (fctx.is_abstract_member && not (Meta.has Meta.Impl f2.cf_meta)) || (Meta.has Meta.Impl f2.cf_meta && not (fctx.is_abstract_member)) then
@@ -1431,7 +1431,7 @@ let check_overload ctx f fs =
 			) fs
 		in
 		display_error ctx ("Another overloaded field of same signature was already declared : " ^ f.cf_name) f.cf_pos;
-		display_error ctx ("The second field is declared here") f2.cf_pos
+		display_error ctx (compl_msg "The second field is declared here") f2.cf_pos
 	with Not_found ->
 		try
 			let f2 =
@@ -1445,7 +1445,7 @@ let check_overload ctx f fs =
 				f.cf_name ^
 				"\nThe signatures are different in Haxe, but not in the target language"
 			) f.cf_pos;
-			display_error ctx ("The second field is declared here") f2.cf_pos
+			display_error ctx (compl_msg "The second field is declared here") f2.cf_pos
 		with | Not_found -> ()
 
 let check_overloads ctx c =

+ 1 - 1
src/typing/typeloadModule.ml

@@ -197,7 +197,7 @@ let module_pass_1 ctx m tdecls loadp =
 	let check_name name p =
 		let error prev_pos =
 			display_error ctx ("Name " ^ name ^ " is already defined in this module") p;
-			error "Previous declaration here" prev_pos;
+			error (compl_msg "Previous declaration here") prev_pos;
 		in
 		List.iter (fun (t2,(_,p2)) ->
 			if snd (t_path t2) = name then error (t_infos t2).mt_name_pos

+ 1 - 1
src/typing/typer.ml

@@ -1958,7 +1958,7 @@ and type_map_declaration ctx e1 el with_type p =
 		try
 			let p = Hashtbl.find keys e_key.eexpr in
 			display_error ctx "Duplicate key" e_key.epos;
-			error "Previously defined here" p
+			error (compl_msg "Previously defined here") p
 		with Not_found ->
 			begin match e_key.eexpr with
 			| TConst _ -> Hashtbl.add keys e_key.eexpr e_key.epos;

+ 2 - 2
tests/misc/compiler_loops/projects/Issue5189/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:18: characters 9-29 : error: { c : Array<TT_A>, b : String, a : Int } has no field d
-Main.hx:18: characters 9-29 :  have: { c: Array<{ c, b, a }> }
-Main.hx:18: characters 9-29 :  want: { c: Array<TT_B> }
+Main.hx:18: characters 9-29 : ... have: { c: Array<{ c, b, a }> }
+Main.hx:18: characters 9-29 : ... want: { c: Array<TT_B> }

+ 3 - 3
tests/misc/java/projects/Issue2689/compile-fail.hxml.stderr

@@ -1,5 +1,5 @@
 Main.hx:4: characters 13-58 : Another overloaded field of similar signature was already declared : conflict
-Main.hx:4: characters 13-58 : The signatures are different in Haxe, but not in the target language
-Main.hx:5: characters 13-59 : The second field is declared here
+Main.hx:4: characters 13-58 : ... The signatures are different in Haxe, but not in the target language
+Main.hx:5: characters 13-59 : ... The second field is declared here
 Main.hx:7: characters 13-54 : Another overloaded field of same signature was already declared : same
-Main.hx:8: characters 13-54 : The second field is declared here
+Main.hx:8: characters 13-54 : ... The second field is declared here

+ 1 - 1
tests/misc/projects/Issue1310/compile1-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main1.hx:17: characters 13-18 : Array<Int> should be ToString.S
-Main1.hx:17: characters 13-18 : For function argument ''
+Main1.hx:17: characters 13-18 : ... For function argument ''

+ 1 - 1
tests/misc/projects/Issue2148/compile1-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main1.hx:7: characters 22-25 : Unknown identifier : foo
-Main1.hx:7: characters 22-25 : For function argument 'i'
+Main1.hx:7: characters 22-25 : ... For function argument 'i'

+ 1 - 1
tests/misc/projects/Issue2232/compile1-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main1.hx:4: characters 7-8 : Float should be Int
-Main1.hx:4: characters 7-8 : For optional function argument 'x'
+Main1.hx:4: characters 7-8 : ... For optional function argument 'x'

+ 2 - 2
tests/misc/projects/Issue2472/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:12: characters 22-23 : Constraint check failure for A.O
-Main.hx:12: characters 22-23 : B.O should be { id : String }
-Main.hx:12: characters 22-23 : B.O has no field id
+Main.hx:12: characters 22-23 : ... B.O should be { id : String }
+Main.hx:12: characters 22-23 : ... B.O has no field id

+ 4 - 4
tests/misc/projects/Issue2969/compile-fail.hxml.stderr

@@ -1,5 +1,5 @@
 Main.hx:10: characters 18-19 : Field a has different type than in A
-Main.hx:2: characters 2-29 : Interface field is defined here
-Main.hx:10: characters 18-19 : error: Int should be String
-Main.hx:10: characters 18-19 :  have: (...) -> Int
-Main.hx:10: characters 18-19 :  want: (...) -> String
+Main.hx:2: characters 2-29 : ... Interface field is defined here
+Main.hx:10: characters 18-19 : ... error: Int should be String
+Main.hx:10: characters 18-19 : ... have: (...) -> Int
+Main.hx:10: characters 18-19 : ... want: (...) -> String

+ 4 - 4
tests/misc/projects/Issue3361/compile1-fail.hxml.stderr

@@ -1,5 +1,5 @@
 Main.hx:6: characters 13-14 : Field v has different type than in I
-Main.hx:2: characters 2-29 : Interface field is defined here
-Main.hx:6: characters 13-14 : error: String should be Dynamic
-Main.hx:6: characters 13-14 :  have: (Dynamic) -> ...
-Main.hx:6: characters 13-14 :  want: (String) -> ...
+Main.hx:2: characters 2-29 : ... Interface field is defined here
+Main.hx:6: characters 13-14 : ... error: String should be Dynamic
+Main.hx:6: characters 13-14 : ... have: (Dynamic) -> ...
+Main.hx:6: characters 13-14 : ... want: (String) -> ...

+ 4 - 4
tests/misc/projects/Issue3361/compile2-fail.hxml.stderr

@@ -1,5 +1,5 @@
 Main2.hx:6: characters 26-27 : Field f has different type than in I
-Main2.hx:2: characters 2-44 : Interface field is defined here
-Main2.hx:6: characters 26-27 : error: String should be Dynamic
-Main2.hx:6: characters 26-27 :  have: (Dynamic) -> ...
-Main2.hx:6: characters 26-27 :  want: (String) -> ...
+Main2.hx:2: characters 2-44 : ... Interface field is defined here
+Main2.hx:6: characters 26-27 : ... error: String should be Dynamic
+Main2.hx:6: characters 26-27 : ... have: (Dynamic) -> ...
+Main2.hx:6: characters 26-27 : ... want: (String) -> ...

+ 2 - 2
tests/misc/projects/Issue3417/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:6: characters 21-22 : Field f has different type than in I
-Main.hx:2: characters 5-28 : Interface field is defined here
-Main.hx:6: characters 21-22 : Different number of function arguments
+Main.hx:2: characters 5-28 : ... Interface field is defined here
+Main.hx:6: characters 21-22 : ... Different number of function arguments

+ 2 - 2
tests/misc/projects/Issue3781/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:12: characters 12-13 : Constraint check failure for E1.T
-Main.hx:12: characters 12-13 : Main.T should be String
-Main.hx:12: characters 12-13 : For function argument 'v'
+Main.hx:12: characters 12-13 : ... Main.T should be String
+Main.hx:12: characters 12-13 : ... For function argument 'v'

+ 1 - 1
tests/misc/projects/Issue3975/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:4: characters 3-53 : Array<String> should be { pop : () -> Void }
-Main.hx:4: characters 3-53 : Field pop is method but should be (get,never)
+Main.hx:4: characters 3-53 : ... Field pop is method but should be (get,never)

+ 2 - 2
tests/misc/projects/Issue4250/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:11: characters 9-31 : error: SomeNode should be Node
-Main.hx:11: characters 9-31 :  have: { parent: SomeNode }
-Main.hx:11: characters 9-31 :  want: { parent: Node }
+Main.hx:11: characters 9-31 : ... have: { parent: SomeNode }
+Main.hx:11: characters 9-31 : ... want: { parent: Node }

+ 1 - 1
tests/misc/projects/Issue4364/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:22: characters 17-18 : Constraint check failure for G.T
-Main.hx:22: characters 17-18 : A should be haxe.Constructible<() -> Void>
+Main.hx:22: characters 17-18 : ... A should be haxe.Constructible<() -> Void>

+ 4 - 4
tests/misc/projects/Issue4378/compile-fail.hxml.stderr

@@ -1,5 +1,5 @@
 Main.hx:5: characters 18-22 : Field test has different type than in I
-Main.hx:16: characters 2-32 : Interface field is defined here
-Main.hx:5: characters 18-22 : error: String should be Dynamic
-Main.hx:5: characters 18-22 :  have: (Dynamic) -> ...
-Main.hx:5: characters 18-22 :  want: (String) -> ...
+Main.hx:16: characters 2-32 : ... Interface field is defined here
+Main.hx:5: characters 18-22 : ... error: String should be Dynamic
+Main.hx:5: characters 18-22 : ... have: (Dynamic) -> ...
+Main.hx:5: characters 18-22 : ... want: (String) -> ...

+ 1 - 1
tests/misc/projects/Issue4540/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:3: characters 57-58 : Int should be { test : String }
-Main.hx:3: characters 57-58 : For function argument 'a'
+Main.hx:3: characters 57-58 : ... For function argument 'a'

+ 2 - 2
tests/misc/projects/Issue4775/compile1-fail.hxml.stderr

@@ -1,4 +1,4 @@
 Main1.hx:7: characters 15-26 : Constraint check failure for Contain.T
-Main1.hx:7: characters 15-26 : Main1 should be String
-Main1.hx:7: characters 15-26 : For function argument 't'
+Main1.hx:7: characters 15-26 : ... Main1 should be String
+Main1.hx:7: characters 15-26 : ... For function argument 't'
 Main1.hx:7: characters 3-27 : Could not determine type for parameter T

+ 2 - 2
tests/misc/projects/Issue4803/compile-fail.hxml.stderr

@@ -3,8 +3,8 @@ Main.hx:16: lines 16-19 : Overload resolution failed for () -> JQuery
 Main.hx:16: lines 16-19 : Too many arguments
 Main.hx:16: lines 16-19 : Overload resolution failed for (handler : (Event -> Void)) -> JQuery
 Main.hx:18: characters 8-17 : Object requires field y
-Main.hx:18: characters 8-17 : For function argument 'handler'
+Main.hx:18: characters 8-17 : ... For function argument 'handler'
 Main.hx:16: lines 16-19 : Overload resolution failed for (?eventData : Null<Dynamic>, handler : (Event -> Void)) -> JQuery
 Main.hx:18: characters 8-17 : Object requires field y
-Main.hx:18: characters 8-17 : For optional function argument 'eventData'
+Main.hx:18: characters 8-17 : ... For optional function argument 'eventData'
 Main.hx:16: lines 16-19 : End of overload failure reasons

+ 2 - 2
tests/misc/projects/Issue5206/compile-fail.hxml.stderr

@@ -1,4 +1,4 @@
 Main.hx:14: characters 29-34 : A should be X
-Main.hx:14: characters 29-34 : { pos : Int, len : Int } has no field x
+Main.hx:14: characters 29-34 : ... { pos : Int, len : Int } has no field x
 Main.hx:14: characters 27-40 : Y should be Z
-Main.hx:14: characters 27-40 : { y : Int, x : Int } has no field len
+Main.hx:14: characters 27-40 : ... { y : Int, x : Int } has no field len

+ 1 - 1
tests/misc/projects/Issue5644/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 User.hx:1: characters 20-47 : Type not found : ThisObviouslyDoesntExist
-Main.hx:1: lines 1-5 : Defined in this class
+Main.hx:1: lines 1-5 : ... Defined in this class

+ 6 - 6
tests/misc/projects/Issue5946/compile-fail.hxml.stderr

@@ -1,8 +1,8 @@
 Main.hx:4: characters 28-31 : Class<Two> should be Class<Unknown<0> : One>
-Main.hx:4: characters 28-31 : Constraint check failure for downcast.S
-Main.hx:4: characters 28-31 : Two should be One
-Main.hx:4: characters 28-31 : For function argument 'c'
+Main.hx:4: characters 28-31 : ... Constraint check failure for downcast.S
+Main.hx:4: characters 28-31 : ... Two should be One
+Main.hx:4: characters 28-31 : ... For function argument 'c'
 Main.hx:5: characters 29-33 : Class<ITwo> should be Class<Unknown<0> : IOne>
-Main.hx:5: characters 29-33 : Constraint check failure for downcast.S
-Main.hx:5: characters 29-33 : ITwo should be IOne
-Main.hx:5: characters 29-33 : For function argument 'c'
+Main.hx:5: characters 29-33 : ... Constraint check failure for downcast.S
+Main.hx:5: characters 29-33 : ... ITwo should be IOne
+Main.hx:5: characters 29-33 : ... For function argument 'c'

+ 2 - 2
tests/misc/projects/Issue5949/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:11: characters 11-14 : Field a has different @:native value than in superclass
-Main.hx:6: characters 18-19 : Base field is defined here
-Main.hx:10: lines 10-12 : Defined in this class
+Main.hx:6: characters 18-19 : ... Base field is defined here
+Main.hx:10: lines 10-12 : ... Defined in this class

+ 4 - 4
tests/misc/projects/Issue6065/compile-fail.hxml.stderr

@@ -3,14 +3,14 @@ Main.hx:8: characters 9-18 : Overload resolution failed for () -> Void
 Main.hx:8: characters 13-17 : Too many arguments
 Main.hx:8: characters 9-18 : Overload resolution failed for (t : f.T) -> Void
 Main.hx:8: characters 13-17 : Constraint check failure for f.T
-Main.hx:8: characters 13-17 : String should be Int
-Main.hx:8: characters 13-17 : For function argument 't'
+Main.hx:8: characters 13-17 : ... String should be Int
+Main.hx:8: characters 13-17 : ... For function argument 't'
 Main.hx:8: characters 9-18 : End of overload failure reasons
 Main.hx:9: characters 9-16 : Could not find a suitable overload, reasons follow
 Main.hx:9: characters 9-16 : Overload resolution failed for () -> Void
 Main.hx:9: characters 13-15 : Too many arguments
 Main.hx:9: characters 9-16 : Overload resolution failed for (t : f.T) -> Void
 Main.hx:9: characters 13-15 : Constraint check failure for f.T
-Main.hx:9: characters 13-15 : { } should be Int
-Main.hx:9: characters 13-15 : For function argument 't'
+Main.hx:9: characters 13-15 : ... { } should be Int
+Main.hx:9: characters 13-15 : ... For function argument 't'
 Main.hx:9: characters 9-16 : End of overload failure reasons

+ 1 - 1
tests/misc/projects/Issue6714/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:10: characters 22-28 : String should be Bool
-Main.hx:10: characters 22-28 : For function argument 'a'
+Main.hx:10: characters 22-28 : ... For function argument 'a'

+ 2 - 2
tests/misc/projects/Issue6757/compile-fail.hxml.stderr

@@ -1,4 +1,4 @@
 Test.hx:5: characters 27-37 : error: Bool should be String
-Test.hx:5: characters 27-37 :  have: haxe.ds.Option<Bool>
-Test.hx:5: characters 27-37 :  want: haxe.ds.Option<String>
+Test.hx:5: characters 27-37 : ... have: haxe.ds.Option<Bool>
+Test.hx:5: characters 27-37 : ... want: haxe.ds.Option<String>
 Test.hx:9: characters 11-12 : Warning : haxe.ds.Option<String>

+ 1 - 1
tests/misc/projects/Issue6790/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Mismatch.hx:6: characters 19-26 : (e : Unknown<0>) -> String should be Null<js.lib.PromiseHandler<Dynamic, Int>>
-Mismatch.hx:6: characters 19-26 : For optional function argument 'onRejected'
+Mismatch.hx:6: characters 19-26 : ... For optional function argument 'onRejected'

+ 1 - 1
tests/misc/projects/Issue6796/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:3: characters 21-25 : Array access is not allowed on () -> Unknown<0>
-Main.hx:3: characters 21-25 : For function argument 'v'
+Main.hx:3: characters 21-25 : ... For function argument 'v'

+ 6 - 6
tests/misc/projects/Issue6810/compile-fail.hxml.stderr

@@ -1,8 +1,8 @@
 Fail.hx:7: characters 8-12 : error: Void should be haxe.NotVoid
-Fail.hx:7: characters 8-12 :  have: (...) -> Void
-Fail.hx:7: characters 8-12 :  want: (...) -> haxe.NotVoid
-Fail.hx:7: characters 8-12 : For function argument 'f'
+Fail.hx:7: characters 8-12 : ... have: (...) -> Void
+Fail.hx:7: characters 8-12 : ... want: (...) -> haxe.NotVoid
+Fail.hx:7: characters 8-12 : ... For function argument 'f'
 Fail.hx:8: characters 8-16 : error: FakeVoid should be haxe.NotVoid
-Fail.hx:8: characters 8-16 :  have: (...) -> FakeVoid
-Fail.hx:8: characters 8-16 :  want: (...) -> haxe.NotVoid
-Fail.hx:8: characters 8-16 : For function argument 'f'
+Fail.hx:8: characters 8-16 : ... have: (...) -> FakeVoid
+Fail.hx:8: characters 8-16 : ... want: (...) -> haxe.NotVoid
+Fail.hx:8: characters 8-16 : ... For function argument 'f'

+ 1 - 1
tests/misc/projects/Issue6826/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:5: characters 20-21 : Expression cannot be empty
-Main.hx:5: characters 20-21 : For function argument 'v'
+Main.hx:5: characters 20-21 : ... For function argument 'v'

+ 1 - 1
tests/misc/projects/Issue6878/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:11: characters 11-15 : Constraint check failure for Foo.T
-Main.hx:11: characters 11-15 : "10" should be Int
+Main.hx:11: characters 11-15 : ... "10" should be Int

+ 2 - 2
tests/misc/projects/Issue6878/compile1-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main1.hx:4: characters 8-10 : Constraint check failure for test.T
-Main1.hx:4: characters 8-10 : Int should be String
-Main1.hx:4: characters 8-10 : For function argument 't'
+Main1.hx:4: characters 8-10 : ... Int should be String
+Main1.hx:4: characters 8-10 : ... For function argument 't'

+ 2 - 2
tests/misc/projects/Issue7039/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:4: characters 3-33 : error: Cannot unify final and non-final fields
-Main.hx:4: characters 3-33 :  have: { foo: Dynamic }
-Main.hx:4: characters 3-33 :  want: { foo: Dynamic }
+Main.hx:4: characters 3-33 : ... have: { foo: Dynamic }
+Main.hx:4: characters 3-33 : ... want: { foo: Dynamic }

+ 2 - 2
tests/misc/projects/Issue7227/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:4: characters 9-81 : error: { url : String, method : String } should be String
-Main.hx:4: characters 9-81 :  have: Generic<{ url: { url, method } }>
-Main.hx:4: characters 9-81 :  want: Generic<{ url: String }>
+Main.hx:4: characters 9-81 : ... have: Generic<{ url: { url, method } }>
+Main.hx:4: characters 9-81 : ... want: Generic<{ url: String }>

+ 2 - 2
tests/misc/projects/Issue7526/compile-fail.hxml.stderr

@@ -1,4 +1,4 @@
 Main.hx:16: characters 9-29 : Class<C> should be { member : Int }
-Main.hx:16: characters 9-29 : The field member is not public
+Main.hx:16: characters 9-29 : ... The field member is not public
 Main.hx:17: characters 9-29 : Abstract<A> should be { member : Int }
-Main.hx:17: characters 9-29 : The field member is not public
+Main.hx:17: characters 9-29 : ... The field member is not public

+ 1 - 1
tests/misc/projects/Issue7614/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:13: characters 1-24 : Abstract chain detected: Test2 -> Test -> Test2
-Main.hx:6: lines 6-10 : Defined in this class
+Main.hx:6: lines 6-10 : ... Defined in this class
 Main.hx:6: lines 6-10 : Abstract underlying type cannot be recursive

+ 1 - 1
tests/misc/projects/Issue7655/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Mismatch.hx:6: characters 19-26 : (e : Unknown<0>) -> String should be js.lib.PromiseHandler<Dynamic, Int>
-Mismatch.hx:6: characters 19-26 : For optional function argument 'onRejected'
+Mismatch.hx:6: characters 19-26 : ... For optional function argument 'onRejected'

+ 1 - 1
tests/misc/projects/Issue7968/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Foo.hx:2: characters 1-18 : Name A is already defined in this module
-Foo.hx:1: characters 9-10 : Previous declaration here
+Foo.hx:1: characters 9-10 : ... Previous declaration here

+ 1 - 1
tests/misc/projects/Issue7997/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:4: characters 4-19 : Recursive type
-Main.hx:4: characters 4-19 : Unknown<0> appears in { args: Unknown<0> : { field : Unknown<1>, args : Unknown<0> } }
+Main.hx:4: characters 4-19 : ... Unknown<0> appears in { args: Unknown<0> : { field : Unknown<1>, args : Unknown<0> } }

+ 1 - 1
tests/misc/projects/Issue8283/compile-fail.hxml.stderr

@@ -1,4 +1,4 @@
 Main.hx:9: characters 35-48 : Arrays of mixed types are only allowed if the type is forced to Array<Dynamic>
 Main.hx:9: characters 35-48 : Arrays of mixed types are only allowed if the type is forced to Array<Dynamic>
 Main.hx:9: characters 35-48 : String should be Int
-Main.hx:9: characters 35-48 : For optional function argument 'arr'
+Main.hx:9: characters 35-48 : ... For optional function argument 'arr'

+ 1 - 1
tests/misc/projects/Issue8488/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:5: characters 45-48 : String should be Int
-Main.hx:5: characters 45-48 : For optional function argument 'a'
+Main.hx:5: characters 45-48 : ... For optional function argument 'a'

+ 1 - 1
tests/misc/projects/Issue8517/compile-fail.hxml.stderr

@@ -1,4 +1,4 @@
 Macro.hx:3: characters 60-69 : Invalid assign
-Fail.hx:1: lines 1-7 : Defined in this class
+Fail.hx:1: lines 1-7 : ... Defined in this class
 Fail.hx:4: characters 3-12 : Invalid assign
 Fail.hx:5: characters 3-12 : Invalid assign

+ 1 - 1
tests/misc/projects/Issue8618/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:4: characters 9-36 : Method staticMethod cannot be used as a value
-Main.hx:4: characters 9-36 : For function argument 'v'
+Main.hx:4: characters 9-36 : ... For function argument 'v'

+ 1 - 1
tests/misc/projects/Issue8618/compile2-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main2.hx:3: characters 9-45 : Method instanceMethod cannot be used as a value
-Main2.hx:3: characters 9-45 : For function argument 'v'
+Main2.hx:3: characters 9-45 : ... For function argument 'v'

+ 1 - 1
tests/misc/projects/Issue8618/compile3-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main3.hx:3: characters 9-42 : Method noClosureStaticMethod cannot be used as a value
-Main3.hx:3: characters 9-42 : For function argument 'v'
+Main3.hx:3: characters 9-42 : ... For function argument 'v'

+ 1 - 1
tests/misc/projects/Issue8618/compile4-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main4.hx:3: characters 9-51 : Method noClosureInstanceMethod cannot be used as a value
-Main4.hx:3: characters 9-51 : For function argument 'v'
+Main4.hx:3: characters 9-51 : ... For function argument 'v'

+ 1 - 1
tests/misc/projects/Issue8704/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:3: characters 14-16 : { } should be Under<Unknown<0>>
-Main.hx:3: characters 14-16 : For function argument 'v'
+Main.hx:3: characters 14-16 : ... For function argument 'v'

+ 2 - 2
tests/misc/projects/Issue8787/compile1-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main1.hx:7: characters 7-9 : Constraint check failure for E.T
-Main1.hx:7: characters 7-9 : Int should be String
-Main1.hx:7: characters 7-9 : For function argument 't'
+Main1.hx:7: characters 7-9 : ... Int should be String
+Main1.hx:7: characters 7-9 : ... For function argument 't'

+ 2 - 2
tests/misc/projects/Issue8787/compile2-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main2.hx:7: characters 7-9 : Constraint check failure for C.T
-Main2.hx:7: characters 7-9 : Int should be String
-Main2.hx:7: characters 7-9 : For function argument 't'
+Main2.hx:7: characters 7-9 : ... Int should be String
+Main2.hx:7: characters 7-9 : ... For function argument 't'

+ 1 - 1
tests/misc/projects/Issue8819/compile-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Main.hx:3: characters 17-20 : Abstract<Foo> should be Enum<Unknown<0>>
-Main.hx:3: characters 17-20 : For function argument 'e'
+Main.hx:3: characters 17-20 : ... For function argument 'e'

+ 4 - 4
tests/misc/projects/Issue9010/NativeMeta-fail.hxml.stderr

@@ -1,6 +1,6 @@
 NativeMeta.hx:4: characters 11-24 : Field some has different @:native value than in superclass
-NativeMeta.hx:16: characters 11-25 : Base field is defined here
-NativeMeta.hx:1: lines 1-13 : Defined in this class
+NativeMeta.hx:16: characters 11-25 : ... Base field is defined here
+NativeMeta.hx:1: lines 1-13 : ... Defined in this class
 NativeMeta.hx:9: characters 11-25 : Field noNative has different @:native value than in superclass
-NativeMeta.hx:20: characters 18-26 : Base field is defined here
-NativeMeta.hx:1: lines 1-13 : Defined in this class
+NativeMeta.hx:20: characters 18-26 : ... Base field is defined here
+NativeMeta.hx:1: lines 1-13 : ... Defined in this class

+ 1 - 1
tests/misc/projects/Issue9017/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:8: characters 1-13 : @:structInit is not allowed on interfaces
-Main.hx:9: lines 9-11 : Defined in this class
+Main.hx:9: lines 9-11 : ... Defined in this class
 Main.hx:3: characters 15-26 : Foo does not have a constructor

+ 2 - 2
tests/misc/projects/Issue9556/compile-fail.hxml.stderr

@@ -1,3 +1,3 @@
 Main.hx:4: characters 5-10 : Constraint check failure for Main.T
-Main.hx:4: characters 5-10 : String should be Int
-Main.hx:4: characters 5-10 : For function argument 't'
+Main.hx:4: characters 5-10 : ... String should be Int
+Main.hx:4: characters 5-10 : ... For function argument 't'

+ 1 - 1
tests/misc/projects/Issue9631/compile-fields-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Fields.hx:5: characters 10-14 : Name main is already defined in this module
-Fields.hx:1: characters 10-14 : Previous declaration here
+Fields.hx:1: characters 10-14 : ... Previous declaration here

+ 1 - 1
tests/misc/projects/Issue9631/compile-types-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Types.hx:7: characters 7-12 : Name Types is already defined in this module
-Types.hx:1: characters 7-12 : Previous declaration here
+Types.hx:1: characters 7-12 : ... Previous declaration here

+ 2 - 2
tests/misc/projects/issue5002/compile-fail.hxml.stderr

@@ -1,4 +1,4 @@
 Main.hx:1: characters 1-8 : "0" is not a valid field name.
-Main.hx:2: lines 2-4 : Defined in this class
+Main.hx:2: lines 2-4 : ... Defined in this class
 Main.hx:1: characters 1-8 : "this" is not a valid field name.
-Main.hx:2: lines 2-4 : Defined in this class
+Main.hx:2: lines 2-4 : ... Defined in this class

+ 7 - 7
tests/misc/projects/issue5002/compile2-fail.hxml.stderr

@@ -1,17 +1,17 @@
 "0_variable" is not a valid variable name.
-Main2.hx:6: characters 3-32 : Called from macro here
+Main2.hx:6: characters 3-32 : ... Called from macro here
 "var" is not a valid variable name.
-Main2.hx:7: characters 3-25 : Called from macro here
+Main2.hx:7: characters 3-25 : ... Called from macro here
 "new" is not a valid variable name.
-Main2.hx:8: characters 3-25 : Called from macro here
+Main2.hx:8: characters 3-25 : ... Called from macro here
 "foo \"\t\n" is not a valid variable name.
-Main2.hx:9: characters 3-32 : Called from macro here
+Main2.hx:9: characters 3-32 : ... Called from macro here
 "0_catchVariable" is not a valid catch variable name.
-Main2.hx:10: characters 3-25 : Called from macro here
+Main2.hx:10: characters 3-25 : ... Called from macro here
 "0_function" is not a valid function name.
-Main2.hx:11: characters 3-24 : Called from macro here
+Main2.hx:11: characters 3-24 : ... Called from macro here
 "0_argument" is not a valid function argument name.
-Main2.hx:12: characters 3-32 : Called from macro here
+Main2.hx:12: characters 3-32 : ... Called from macro here
 Main2.hx:13: characters 3-27 : Pattern variables must be lower-case
 Main2.hx:14: characters 3-23 : "0_forVariable" is not a valid for variable name.
 Main2.hx:15: characters 3-31 : "0_forVariableKey" is not a valid for variable name.

+ 1 - 1
tests/misc/resolution/projects/modulestatics/compile-duplicate-fail.hxml.stderr

@@ -1,2 +1,2 @@
 Duplicate.hx:2: characters 7-8 : Name C is already defined in this module
-Duplicate.hx:1: characters 10-11 : Previous declaration here
+Duplicate.hx:1: characters 10-11 : ... Previous declaration here