# New Ticket Created by  Chris Fields 
# Please include the string:  [perl #66280]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=66280 >


This is a nasty one.  Using a Range with a lexical in an inner for  
block with nested pointy block modifies the lexical.

IRC link:

http://irclog.perlgeek.de/perl6/2009-06-04#i_1208694

Was occurring as of Rakudo 77db80 (on IRC).

Simple test cases:

pyrimidine1:bioperl6 cjfields$ perl6
 > for 1,3 -> $i { my $tmp = $i; for $tmp,4 -> $j { say "($j;$i)"};  
$i.say }
(1;1)
(4;1)
1
(3;3)
(4;3)
3
 > for 1,3 -> $i { for $i..4 -> $j { say "($j;$i)"}; $i.say }
(1;5)
(2;5)
(3;5)
(4;5)
5
(3;5)
(4;5)
5
 > for 1,3 -> $i { for 1..4 -> $j { say "($j;$i)"}; $i.say }
(1;1)
(2;1)
(3;1)
(4;1)
1
(1;3)
(2;3)
(3;3)
(4;3)
3


cjfields (aka pyrimidine)

Reply via email to