Permalink
Browse files

RT #110096, attributes in a sub in a class

  • Loading branch information...
1 parent 288969f commit 6ec4397afb39a7ad4c4dff0847358bb1586d4c14 @moritz moritz committed Jan 4, 2013
Showing with 12 additions and 1 deletion.
  1. +12 −1 S12-attributes/instance.t
View
13 S12-attributes/instance.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 138;
+plan 139;
=begin pod
@@ -672,6 +672,17 @@ eval_dies_ok q[class A { has $!a }; my $a = A.new(a => 42);
is $c, 3, 'Correct flattening behavior for array attributes';
}
+# RT #110096
+{
+ class AttrInSub {
+ sub f {
+ has $.x;
+ }
+ }
+ is AttrInSub.new(x => 42).x, 42, 'Attribute declaration can be in sub-scope too';
+
+}
+
done();
# vim: ft=perl6

0 comments on commit 6ec4397

Please sign in to comment.