Răsfoiți Sursa

fix parametrized anon function capture

Dan Korostelev 11 ani în urmă
părinte
comite
ad4c1dfb4c
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      gencommon.ml

+ 1 - 1
gencommon.ml

@@ -2984,7 +2984,7 @@ struct
 					| Some tparam_anon_decl ->
 						(match (vv, ve) with
 							| ({ v_extra = Some( _ :: _, _) } as v), Some ({ eexpr = TFunction tf } as f)
-							| ({ v_extra = Some( _ :: _, _) } as v), Some { eexpr = TArrayDecl([{ eexpr = TFunction tf } as f]) } -> (* captured transformation *)
+							| ({ v_extra = Some( _ :: _, _) } as v), Some { eexpr = TArrayDecl([{ eexpr = TFunction tf } as f]) | TCall({ eexpr = TLocal { v_name = "__array__" } }, [{ eexpr = TFunction tf } as f]) } -> (* captured transformation *)
 								ignore(tparam_anon_decl v f { tf with tf_expr = run tf.tf_expr });
 								{ e with eexpr = TBlock([]) }
 							| _ ->