|
@@ -339,15 +339,18 @@ let this ctx = match ctx.in_value with None -> "this" | Some _ -> "$this"
|
|
|
|
|
|
let is_dynamic_iterator ctx e =
|
|
let is_dynamic_iterator ctx e =
|
|
let check x =
|
|
let check x =
|
|
- has_feature ctx "HxOverrides.iter" && (match follow x.etype with
|
|
|
|
|
|
+ let rec loop t = match follow t with
|
|
| TInst ({ cl_path = [],"Array" },_)
|
|
| TInst ({ cl_path = [],"Array" },_)
|
|
| TInst ({ cl_kind = KTypeParameter _}, _)
|
|
| TInst ({ cl_kind = KTypeParameter _}, _)
|
|
| TAnon _
|
|
| TAnon _
|
|
| TDynamic _
|
|
| TDynamic _
|
|
| TMono _ ->
|
|
| TMono _ ->
|
|
true
|
|
true
|
|
|
|
+ | TAbstract(a,tl) when not (Meta.has Meta.CoreType a.a_meta) ->
|
|
|
|
+ loop (Abstract.get_underlying_type a tl)
|
|
| _ -> false
|
|
| _ -> false
|
|
- )
|
|
|
|
|
|
+ in
|
|
|
|
+ has_feature ctx "HxOverrides.iter" && loop x.etype
|
|
in
|
|
in
|
|
match e.eexpr with
|
|
match e.eexpr with
|
|
| TField (x,f) when field_name f = "iterator" -> check x
|
|
| TField (x,f) when field_name f = "iterator" -> check x
|