瀏覽代碼

fixed issue 586

Franco Ponticelli 13 年之前
父節點
當前提交
ddf78f6d91
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      genphp.ml

+ 2 - 2
genphp.ml

@@ -1769,8 +1769,8 @@ let generate_field ctx static f =
 			gen_function ctx (s_ident f.cf_name) fd f.cf_params p
 	| _ ->
 		if ctx.curclass.cl_interface then
-			match follow f.cf_type with
-			| TFun (args,r) ->
+			match follow f.cf_type, f.cf_kind with
+			| TFun (args,r), Method _ ->
 				print ctx "function %s(" (s_ident f.cf_name);
 				concat ctx ", " (fun (arg,o,t) ->
 					s_funarg ctx arg t p o;