Просмотр исходного кода

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

Simon Krajewski 12 лет назад
Родитель
Сommit
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
 		| _ ->