You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an explicit for loop variable, the last statement is not sunk.
Related to #1570 (Which focused on the case of for loops with implicit loop variables)
(Updated to better demonstrate the issue)
sub wat ($n) {
1.map: -> $m { say "uno: $m" }
1.map: -> $m { say "dos: $m" }
}
for 1 -> $p { say "|$p|"; wat($p) } # explicit for loop variable
say '';
for 1 { say "|$_|"; wat($_) } # implicit for loop variable
say '';
for 1 -> $p { say "|$p|"; sink wat($p) } # explicit for loop variable with sink
The text was updated successfully, but these errors were encountered:
thundergnat
changed the title
Odd interaction between explicit for loop variables and iterators
Failure to sink last statement in for loop with explicit loop var
Jun 6, 2019
The Problem
When using an explicit for loop variable, the last statement is not sunk.
Related to #1570 (Which focused on the case of for loops with implicit loop variables)
(Updated to better demonstrate the issue)
Expected Behavior
Actual Behavior
Environment
perl6 -v):Linux Mint 19.01 Cinnamon
This is Rakudo version 2019.03 built on MoarVM version 2019.03
implementing Perl 6.d.
and on Camelia: rakudo-moar a643b8b
The text was updated successfully, but these errors were encountered: