Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

RT #110096, attributes in a sub in a class

  • Loading branch information...
commit 6ec4397afb39a7ad4c4dff0847358bb1586d4c14 1 parent 288969f
@moritz moritz authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.