Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test for RT #77460
  • Loading branch information
timo committed Feb 28, 2013
1 parent 937565b commit 7bcdd2b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S04-statements/for.t
Expand Up @@ -14,7 +14,7 @@ for statement as possible
=end description

plan 76;
plan 77;

## No foreach
# L<S04/The C<for> statement/"no foreach statement any more">
Expand Down Expand Up @@ -573,4 +573,14 @@ dies_ok
Foo.new(items => (1, 2, 3, 4)).foo
}, 'for in called method runs (was a sink context bug)';

# RT #77460
{
my @a = 1;
for 1..10 {
my $last = @a[*-1];
push @a, (sub ($s) { $s + 1 })($last)
};
is @a, [1, 2, 3, 4, 5, 6, 7, 8,9, 10, 11];
}

# vim: ft=perl6

0 comments on commit 7bcdd2b

Please sign in to comment.