From dd768ed899d5b128309859ed2187a453a4630a8c Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 7 Oct 2015 11:54:52 -0400 Subject: [PATCH] transform: reactivate shortcut_range by not transforming it prematurely Signed-off-by: Jean Privat --- src/transform.nit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transform.nit b/src/transform.nit index de99e26..cdb6039 100644 --- a/src/transform.nit +++ b/src/transform.nit @@ -394,7 +394,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 +403,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 -- 1.7.9.5