Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #107232: shadowing an attribute with a lexical
  • Loading branch information
moritz committed Jan 12, 2013
1 parent faa03a3 commit 7ec93a8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion S12-attributes/instance.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 139;
plan 140;

=begin pod
Expand Down Expand Up @@ -684,6 +684,19 @@ eval_dies_ok q[class A { has $!a }; my $a = A.new(a => 42);

}

# RT #107232
{
my class Shadowing {
has $x;
method ignores_attr() {
my $x = 42;
return $x;
}
}
is Shadowing.new.ignores_attr(), 42, 'can shadow an attribute with a lexical';

}

done();

# vim: ft=perl6

0 comments on commit 7ec93a8

Please sign in to comment.