Skip to content

Commit

Permalink
test for RT #60780, odd sized list and two iteration variables
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Nov 1, 2011
1 parent 261cff6 commit 0b7f0f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion S04-statements/for.t
Expand Up @@ -13,7 +13,7 @@ for statement as possible
=end description

plan 65;
plan 66;

## No foreach
# L<S04/The C<for> statement/"no foreach statement any more">
Expand Down Expand Up @@ -484,6 +484,11 @@ eval_dies_ok('for(0..5) { }','keyword needs at least one whitespace after it');
is $a, 1, 'for on Range with huge max value is lazy and enters block';
}

# RT #60780
lives_ok {
for 1 .. 5 -> $x, $y? { }
}, 'Iteration variables do not need to add up if one is optional';

done;

# vim: ft=perl6

0 comments on commit 0b7f0f0

Please sign in to comment.