Explorar el Código

rename `type_function_param` to `type_function_arg`

Simon Krajewski hace 11 años
padre
commit
168c89d421
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 2 2
      typeload.ml
  2. 1 1
      typer.ml

+ 2 - 2
typeload.ml

@@ -221,7 +221,7 @@ let type_module_hook = ref (fun _ _ _ -> None)
 let type_function_params_rec = ref (fun _ _ _ _ -> assert false)
 let return_partial_type = ref false
 
-let type_function_param ctx t e opt p =
+let type_function_arg ctx t e opt p =
 	if opt then
 		let e = (match e with None -> Some (EConst (Ident "null"),p) | _ -> e) in
 		ctx.t.tnull t, e
@@ -1925,7 +1925,7 @@ let init_class ctx c p context_init herits fields =
 			let ret = if constr then ctx.t.tvoid else type_opt ctx p fd.f_type in
 			let rec loop args = match args with
 				| (name,opt,t,ct) :: args ->
-					let t, ct = type_function_param ctx (type_opt ctx p t) ct opt p in
+					let t, ct = type_function_arg ctx (type_opt ctx p t) ct opt p in
 					delay ctx PTypeField (fun() -> match follow t with
 						| TAbstract({a_path = ["haxe"],"Rest"},_) ->
 							if not c.cl_extern then error "Rest argument are only supported for extern methods" p;

+ 1 - 1
typer.ml

@@ -3291,7 +3291,7 @@ and type_expr ctx (e,p) (with_type:with_type) =
 		let rt = Typeload.load_type_opt ctx p f.f_type in
 		let args = List.map (fun (s,opt,t,c) ->
 			let t = Typeload.load_type_opt ctx p t in
-			let t, c = Typeload.type_function_param ctx t c opt p in
+			let t, c = Typeload.type_function_arg ctx t c opt p in
 			s , c, t
 		) f.f_args in
 		(match with_type with