瀏覽代碼

call all methods without null optional parameters in flash.

Nicolas Cannasse 19 年之前
父節點
當前提交
670d288ddb
共有 1 個文件被更改,包括 2 次插入20 次删除
  1. 2 20
      typer.ml

+ 2 - 20
typer.ml

@@ -616,24 +616,6 @@ let is_float t =
 	| _ ->
 	| _ ->
 		false
 		false
 
 
-let rec is_flash_extern t =
-	match t with
-	| TLazy f ->
-		is_flash_extern (!f())
-	| TMono r ->
-		(match !r with
-		| None -> false
-		| Some t -> is_flash_extern t)
-	| TInst (c,_) ->
-		(match fst c.cl_path with
-		| "flash" :: _ -> c.cl_extern
-		| _ -> false)
-	| TType (t,_) ->
-		(match t.t_static with		
-		| Some { cl_extern = true; cl_path = "flash" :: _ , _ } -> true
-		| _ -> is_flash_extern t.t_type);
-	| _ -> false
-
 let t_array ctx =
 let t_array ctx =
 	let show = hide_types ctx in
 	let show = hide_types ctx in
 	match load_type_def ctx null_pos ([],"Array") with
 	match load_type_def ctx null_pos ([],"Array") with
@@ -722,8 +704,8 @@ let unify_call_params ctx t el args p =
 			if not opt then begin
 			if not opt then begin
 				error true;
 				error true;
 				List.rev acc
 				List.rev acc
-			end else if is_flash_extern t then 
-				loop acc [] l
+			end else if Plugin.defined "flash" then 
+				List.rev acc
 			else
 			else
 				loop (null p :: acc) [] l
 				loop (null p :: acc) [] l
 		| _ , [] ->
 		| _ , [] ->