Explorar o código

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

Simon Krajewski %!s(int64=12) %!d(string=hai) anos
pai
achega
166e349d6b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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
 		| _ ->