Prechádzať zdrojové kódy

[as3] do not generate var fields on interfaces

Simon Krajewski 11 rokov pred
rodič
commit
aceb3b67af
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      genas3.ml

+ 1 - 1
genas3.ml

@@ -990,7 +990,7 @@ let generate_field ctx static f =
 		let is_getset = (match f.cf_kind with Var { v_read = AccCall } | Var { v_write = AccCall } -> true | _ -> false) in
 		if ctx.curclass.cl_interface then
 			match follow f.cf_type with
-			| TFun (args,r) ->
+			| TFun (args,r) when (match f.cf_kind with Method MethDynamic | Var _ -> false | _ -> true) ->
 				let rec loop = function
 					| [] -> f.cf_name
 					| (Ast.Meta.Getter,[Ast.EConst (Ast.String name),_],_) :: _ -> "get " ^ name