# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #77420]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77420 >
<thundergnat> rakudo: my ($i, $j); for (1..5) {print $i //= $j+=5;
$i++; print ",$j "}
<p6eval> rakudo 82c9e9: OUTPUT«5,5 6,10 7,15 8,20 9,25 »
<thundergnat> Is that a bug or a feature?
<thundergnat> I would have expected 5,5 6,5 7,5 8,5 9,5
<masak> why? you're not resetting $j between iterations.
<TimToady> looks like a bug to me
<masak> oh!
<masak> thundergnat++
* masak submits rakudobug
<TimToady> pugs: my ($i, $j); for (1..5) {print $i //= $j+=5; $i++;
print ",$j "}
<thundergnat> actually, same for ||
<p6eval> pugs: OUTPUT«5,5 6,5 7,5 8,5 9,5 »
<TimToady> pugs has it correct
<masak> aye, those should be thunks.
<masak> rakudo: my ($i, $j); for (1..5) {print $i ||= $j+=5; $i++;
print ",$j "}
<p6eval> rakudo 82c9e9: OUTPUT«5,5 6,10 7,15 8,20 9,25 »