Skip to content

Commit

Permalink
RT #110096, attributes in a sub in a class
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jan 4, 2013
1 parent 288969f commit 6ec4397
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S12-attributes/instance.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 138;
plan 139;

=begin pod
Expand Down Expand Up @@ -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.