Permalink
Browse files

RT #107232: shadowing an attribute with a lexical

  • Loading branch information...
moritz committed Jan 12, 2013
1 parent faa03a3 commit 7ec93a816c067cca53e602f00c73d8ddbd9ea5ec
Showing with 14 additions and 1 deletion.
  1. +14 −1 S12-attributes/instance.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 139;
+plan 140;
=begin pod
@@ -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.