Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #74076: $OUTER::_ in a subroutine inside a loop
  • Loading branch information
moritz committed Sep 12, 2013
1 parent 7d57c4d commit a851ef3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S02-names-vars/variables-and-packages.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 37;
plan 38;

# L<S02/Names/"The following pseudo-package names are reserved">
#?niecza todo 'System.NullReferenceException: Object reference not set to an instance of an object'
Expand Down Expand Up @@ -162,4 +162,13 @@ plan 37;
s(9);/, "can't redeclare something with an implicit outer binding");
}

{
# RT #74076
my $t;
for 'a' {
$t = sub { $OUTER::_ };
}
is $t(), 'a', '$OUTER::_ can access a $_';
}

# vim: ft=perl6

0 comments on commit a851ef3

Please sign in to comment.