Browse Source

prevented several errors when "not enough arguments".

Nicolas Cannasse 19 năm trước cách đây
mục cha
commit
d58119f2d5
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      typer.ml

+ 4 - 2
typer.ml

@@ -710,8 +710,10 @@ let unify_call_params ctx t el args p =
 				error true;
 				loop (null p :: acc) [] [])
 		| [] , (_,opt,_) :: l ->
-			if not opt then error true;
-			if is_flash_extern t then 
+			if not opt then begin
+				error true;
+				List.rev acc
+			end else if is_flash_extern t then 
 				loop acc [] l
 			else
 				loop (null p :: acc) [] l