Merge: Multi iterators
[nit.git] / src / transform.nit
index de99e26..010a944 100644 (file)
@@ -107,7 +107,7 @@ redef class AExpr
 
                visit_all(v)
 
-               if mtype == null and not is_typed then return # Skip broken
+               if is_broken then return # Skip broken
 
                accept_transform_visitor(v)
        end
@@ -369,6 +369,8 @@ redef class AArrayExpr
        # ~~~
        redef fun full_transform_visitor(v)
        do
+               if is_broken then return # Skip broken
+
                var nblock = v.builder.make_block
 
                var nnew = v.builder.make_new(with_capacity_callsite.as(not null), [v.builder.make_int(n_exprs.length)])
@@ -394,7 +396,7 @@ redef class ACrangeExpr
        # `[x..y]` is replaced with `new Range[X](x,y)`
        redef fun accept_transform_visitor(v)
        do
-               if parent isa AForExpr then return # to permit shortcut ranges
+               if parent isa AForGroup then return # to permit shortcut ranges
                replace_with(v.builder.make_new(init_callsite.as(not null), [n_expr, n_expr2]))
        end
 end
@@ -403,7 +405,7 @@ redef class AOrangeExpr
        # `[x..y[` is replaced with `new Range[X].without_last(x,y)`
        redef fun accept_transform_visitor(v)
        do
-               if parent isa AForExpr then return # to permit shortcut ranges
+               if parent isa AForGroup then return # to permit shortcut ranges
                replace_with(v.builder.make_new(init_callsite.as(not null), [n_expr, n_expr2]))
        end
 end