浏览代码

strip abstract this argument for argument completion (see #3256)

Simon Krajewski 11 年之前
父节点
当前提交
b41bc1ab9c
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      typer.ml

+ 6 - 2
typer.ml

@@ -3455,8 +3455,12 @@ and handle_display ctx e iscall p =
 				else if field_name fa = "match" then (match follow e1.etype with
 					| TEnum _ as t -> {e1 with etype = tfun [t] ctx.t.tbool }
 					| _ -> e)
-				else
-					e
+				else begin match fa,follow e.etype with
+					| FStatic(_,cf),TFun(args,ret) when Meta.has Meta.Impl cf.cf_meta ->
+						{e with etype = TFun(List.tl args,ret)}
+					| _ ->
+						e
+				end
 			| _ ->
 				e
 		in