Skip to content

Commit

Permalink
can access a variable in a class package through its long name, RT #7…
Browse files Browse the repository at this point in the history
…4412
  • Loading branch information
bbkr committed Jul 15, 2012
1 parent 1a144b7 commit 0577148
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion S02-packages/package-lookup.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 3;
plan 4;

# L<S02/Package lookup/>

Expand All @@ -12,3 +12,17 @@ class A {
isa_ok A::, Stash, 'Typename:: is a Stash';
ok A::<&foo>, 'can access a subroutine in the stash';
ok A:: === A.WHO, 'A:: returns the same as A.WHO';

# RT 74412
{
class P {
my $q;
method r {
$P::q = 5;
return $P::q;
}
};

lives_ok { P.new.r ~~ 5 or die },
'can access a variable in a class package through its long name';
}

0 comments on commit 0577148

Please sign in to comment.