|
@@ -177,11 +177,7 @@ let make_module ctx mpath file tdecls loadp =
|
|
|
{ f with cff_name = "_new"; cff_access = AStatic :: f.cff_access; cff_kind = FFun fu; cff_meta = (Meta.Impl,[],p) :: f.cff_meta }
|
|
|
| FFun fu when not stat ->
|
|
|
if Meta.has Meta.From f.cff_meta then error "@:from cast functions must be static" f.cff_pos;
|
|
|
- let first = if List.mem AMacro f.cff_access
|
|
|
- then CTPath ({ tpackage = ["haxe";"macro"]; tname = "Expr"; tsub = Some ("ExprOf"); tparams = [TPType this_t] })
|
|
|
- else this_t
|
|
|
- in
|
|
|
- let fu = { fu with f_args = ("this",false,Some first,None) :: fu.f_args } in
|
|
|
+ let fu = { fu with f_args = (if List.mem AMacro f.cff_access then fu.f_args else ("this",false,Some this_t,None) :: fu.f_args) } in
|
|
|
{ f with cff_kind = FFun fu; cff_access = AStatic :: f.cff_access; cff_meta = (Meta.Impl,[],p) :: f.cff_meta }
|
|
|
| _ ->
|
|
|
f
|