Skip to content

Commit 7425d60

Browse files
author
Tadeusz Sośnierz
committed
Tests for RT #92192
1 parent 9e7eee0 commit 7425d60

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

S12-methods/method-vs-sub.t

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use v6;
22
use Test;
3-
plan 4;
3+
plan 5;
44

55
#L<S12/Method call vs. Subroutine call>
66

@@ -27,6 +27,15 @@ is foo($obj), 'sub', 'adding trailing comma should call the "sub"';
2727
"Can return from method called from a hash lookup (RT 69610)" );
2828
}
2929

30+
# RT #92192
31+
{
32+
my @a;
33+
my $n;
34+
for 1..5 -> $i { @a.push(anon method foo { $n++ }) };
35+
.($_) for @a;
36+
is $n, 5, 'RT #92192';
37+
}
38+
3039
done;
3140

3241
# vim: ft=perl6

0 commit comments

Comments
 (0)