Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #74636, flattening of array attributes
  • Loading branch information
moritz committed Aug 7, 2012
1 parent a0df9db commit 4adc21e
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 137;
plan 138;

=begin pod
Expand Down Expand Up @@ -661,6 +661,17 @@ eval_dies_ok q[class A { has $!a }; my $a = A.new(a => 42);
my $method = method { return $!a }; $a.$method()],
'cannot sneak in access to private attribute through the backdoor';

# RT #74636
{
my class HasArray {
has @.a;
}
my %h = a => <a b c>;
my $c = 0;
++$c for HasArray.new(a => %h<a>).a;
is $c, 3, 'Correct flattening behavior for array attributes';
}

done();

# vim: ft=perl6

0 comments on commit 4adc21e

Please sign in to comment.