Browse Source

apply `@:native` to all overloads too

Simon Krajewski 11 years ago
parent
commit
1200fe4596
2 changed files with 2 additions and 1 deletions
  1. 1 0
      filters.ml
  2. 1 1
      typer.ml

+ 1 - 0
filters.ml

@@ -947,6 +947,7 @@ let apply_native_paths ctx t =
 			let field cf = try
 				let name,_ = get_native_name cf.cf_meta in
 				cf.cf_name <- name;
+				List.iter (fun cf -> cf.cf_name <- name) cf.cf_overloads;
 				did_change := true
 			with Not_found ->
 				()

+ 1 - 1
typer.ml

@@ -769,7 +769,7 @@ let unify_field_call ctx fa el args ret p inline =
 		begin try
 			begin match follow t with
 				| TFun(args,ret) ->
-				let el,tf = unify_call_args' ctx el args ret p inline is_forced_inline in
+					let el,tf = unify_call_args' ctx el args ret p inline is_forced_inline in
 					let mk_call ethis =
 						let ef = mk (TField(ethis,mk_fa cf)) tf p in
 						make_call ctx ef (List.map fst el) ret p