Преглед на файлове

do not use tuple match for array comprehension (closes #2291)

Simon Krajewski преди 12 години
родител
ревизия
166e349d6b
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      matcher.ml

+ 1 - 1
matcher.ml

@@ -1053,7 +1053,7 @@ let match_expr ctx e cases def with_type p =
 	(* type subject(s) *)
 	let array_match = ref false in
 	let evals = match fst e with
-		| EArrayDecl el | EParenthesis(EArrayDecl el,_) ->
+		| EArrayDecl el | EParenthesis(EArrayDecl el,_) when (match el with [(EFor _ | EWhile _),_] -> false | _ -> true) ->
 			array_match := true;
 			List.map (fun e -> type_expr ctx e Value) el
 		| _ ->