Переглянути джерело

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