|
@@ -509,7 +509,7 @@ let optimize_for_loop ctx i e1 e2 p =
|
|
|
| _ , TInst({ cl_path = [],"Array" },[pt])
|
|
|
| _ , TInst({ cl_path = ["flash"],"Vector" },[pt]) ->
|
|
|
gen_int_iter pt
|
|
|
- | _ , TInst({ cl_array_access = Some pt } as c,pl) when (try match follow (PMap.find "length" c.cl_fields).cf_type with TAbstract ({ a_path = [],"Int" },[]) -> true | _ -> false with Not_found -> false) ->
|
|
|
+ | _ , TInst({ cl_array_access = Some pt } as c,pl) when (try match follow (PMap.find "length" c.cl_fields).cf_type with TAbstract ({ a_path = [],"Int" },[]) -> true | _ -> false with Not_found -> false) && not (PMap.mem "iterator" c.cl_fields) ->
|
|
|
gen_int_iter (apply_params c.cl_types pl pt)
|
|
|
| _ , TInst ({ cl_kind = KGenericInstance ({ cl_path = ["haxe"],"FastList" },[t]) } as c,[]) ->
|
|
|
let tcell = (try (PMap.find "head" c.cl_fields).cf_type with Not_found -> assert false) in
|