瀏覽代碼

[macro] remove locate_macro_error

This isn't read anywhere. Perhaps I removed something accidentally... but in that case, nobody seems to be missing it.
Simon Krajewski 1 年之前
父節點
當前提交
eccac86695
共有 3 個文件被更改,包括 0 次插入5 次删除
  1. 0 2
      src/context/typecore.ml
  2. 0 2
      src/typing/callUnification.ml
  3. 0 1
      src/typing/typeloadFields.ml

+ 0 - 2
src/context/typecore.ml

@@ -222,8 +222,6 @@ exception WithTypeError of error
 
 let memory_marker = [|Unix.time()|]
 
-let locate_macro_error = ref true
-
 let make_call_ref : (typer -> texpr -> texpr list -> t -> ?force_inline:bool -> pos -> texpr) ref = ref (fun _ _ _ _ ?force_inline:bool _ -> die "" __LOC__)
 let type_expr_ref : (?mode:access_mode -> typer -> expr -> WithType.t -> texpr) ref = ref (fun ?(mode=MGet) _ _ _ -> die "" __LOC__)
 let type_block_ref : (typer -> expr list -> WithType.t -> pos -> texpr) ref = ref (fun _ _ _ _ -> die "" __LOC__)

+ 0 - 2
src/typing/callUnification.ml

@@ -513,9 +513,7 @@ object(self)
 			let ep = err.err_pos in
 			(* display additional info in the case the error is not part of our original call *)
 			if ep.pfile <> p.pfile || ep.pmax < p.pmin || ep.pmin > p.pmax then begin
-				locate_macro_error := false;
 				old (if (ep = null_pos) then { err with err_pos = p } else err);
-				locate_macro_error := true;
 				(* TODO add as sub for above error *)
 				if ep <> null_pos then old (make_error ~depth:(err.err_depth+1) (Custom (compl_msg "Called from macro here")) p);
 			end else

+ 0 - 1
src/typing/typeloadFields.ml

@@ -560,7 +560,6 @@ let create_class_context c p =
 	cctx
 
 let create_typer_context_for_class ctx cctx p =
-	locate_macro_error := true;
 	incr stats.s_classes_built;
 	let c = cctx.tclass in
 	if cctx.is_lib && not (has_class_flag c CExtern) then ctx.com.error "@:libType can only be used in extern classes" c.cl_pos;