@@ -271,7 +271,7 @@ let transform_abstract_field com this_t a_t a f =
271
271
);
272
272
f_type = Some a_t;
273
273
} in
274
- { f with cff_name = " _new " ,pos f.cff_name; cff_kind = FFun fu; cff_meta = meta }
274
+ { f with cff_name = " _hx_new " ,pos f.cff_name; cff_kind = FFun fu; cff_meta = meta }
275
275
| FFun fu when not stat ->
276
276
if Meta. has Meta. From f.cff_meta then raise_typing_error " @:from cast functions must be static" f.cff_pos;
277
277
{ f with cff_kind = FFun fu }
@@ -631,7 +631,7 @@ let check_field_display ctx fctx c cf =
631
631
let scope, cf = match c.cl_kind with
632
632
| KAbstractImpl _ ->
633
633
if has_class_field_flag cf CfImpl then
634
- (if cf.cf_name = " _new " then
634
+ (if cf.cf_name = " _hx_new " then
635
635
CFSConstructor , {cf with cf_name = " new" }
636
636
else
637
637
CFSMember , cf)
@@ -979,7 +979,7 @@ let check_abstract (ctx,cctx,fctx) a c cf fd t ret p =
979
979
let r = make_lazy ctx.g t (fun () ->
980
980
let args = if is_multitype_cast then begin
981
981
let ctor = try
982
- PMap. find " _new " c.cl_statics
982
+ PMap. find " _hx_new " c.cl_statics
983
983
with Not_found ->
984
984
raise_typing_error " Constructor of multi-type abstract must be defined before the individual @:to-functions are" cf.cf_pos
985
985
in
@@ -1087,7 +1087,7 @@ let check_abstract (ctx,cctx,fctx) a c cf fd t ret p =
1087
1087
| _ -> () ;
1088
1088
in
1089
1089
List. iter check_meta cf.cf_meta;
1090
- if cf.cf_name = " _new " && Meta. has Meta. MultiType a.a_meta then fctx.do_bind < - false ;
1090
+ if cf.cf_name = " _hx_new " && Meta. has Meta. MultiType a.a_meta then fctx.do_bind < - false ;
1091
1091
if fd.f_expr = None then begin
1092
1092
if fctx.is_inline then missing_expression ctx.com fctx " Inline functions must have an expression" cf.cf_pos;
1093
1093
if fd.f_type = None then raise_typing_error (" Functions without expressions must have an explicit return type" ) cf.cf_pos;
@@ -1160,7 +1160,7 @@ let setup_args_ret ctx cctx fctx name fd p =
1160
1160
maybe_use_property_type fd.f_type (fun () -> match Lazy. force mk with MKGetter | MKSetter -> true | _ -> false ) def
1161
1161
end in
1162
1162
let abstract_this = match cctx.abstract with
1163
- | Some a when fctx.is_abstract_member && name <> " _new " (* TODO: this sucks *) && not fctx.is_macro ->
1163
+ | Some a when fctx.is_abstract_member && name <> " _hx_new " (* TODO: this sucks *) && not fctx.is_macro ->
1164
1164
Some a.a_this
1165
1165
| _ ->
1166
1166
None
0 commit comments