浏览代码

change longstanding haxe.PosInfos : report classpath relative file (with package name) instead of base filename only

ncannasse 7 年之前
父节点
当前提交
182f929510
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/typing/typer.ml

+ 1 - 1
src/typing/typer.ml

@@ -54,7 +54,7 @@ type object_decl_kind =
 let build_call_ref : (typer -> access_kind -> expr list -> with_type -> pos -> texpr) ref = ref (fun _ _ _ _ _ -> assert false)
 
 let mk_infos ctx p params =
-	let file = if ctx.in_macro then p.pfile else if Common.defined ctx.com Define.AbsolutePath then Path.get_full_path p.pfile else Filename.basename p.pfile in
+	let file = if ctx.in_macro || not(Common.defined ctx.com Define.AbsolutePath) then p.pfile else Path.get_full_path p.pfile in
 	(EObjectDecl (
 		(("fileName",null_pos,NoQuotes) , (EConst (String file) , p)) ::
 		(("lineNumber",null_pos,NoQuotes) , (EConst (Int (string_of_int (Lexer.get_error_line p))),p)) ::