浏览代码

[js] consider @:selfCall when generating bound method values (closes #4425)

Dan Korostelev 9 年之前
父节点
当前提交
6d73a932ca
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      genjs.ml

+ 2 - 2
genjs.ml

@@ -505,11 +505,11 @@ and gen_expr ctx e =
 			gen_value ctx x;
 			print ctx ",";
 			gen_value ctx x;
-			print ctx "%s)" (field f.cf_name)
+			print ctx "%s)" (if Meta.has Meta.SelfCall f.cf_meta then "" else (field f.cf_name))
 		| _ ->
 			print ctx "($_=";
 			gen_value ctx x;
-			print ctx ",$bind($_,$_%s))" (field f.cf_name))
+			print ctx ",$bind($_,$_%s))" (if Meta.has Meta.SelfCall f.cf_meta then "" else (field f.cf_name)))
 	| TEnumParameter (x,_,i) ->
 		gen_value ctx x;
 		print ctx "[%i]" (i + 2)