Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #68136, parameterized role doing non-parameterized role
  • Loading branch information
moritz committed Oct 16, 2011
1 parent 77e0ced commit ddc1d53
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion S14-roles/parameterized-type.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 25;
plan 26;

=begin pod
Expand Down Expand Up @@ -62,6 +62,23 @@ dies_ok { R2[C3].new.call_fail }, 'classes being used as type constraints insid
# RT #72694
eval_dies_ok 'role ABCD[EFGH] { }', 'role with undefined type as parameter dies';

# RT #68136
{
role TreeNode[::T] does Positional {
has TreeNode[T] @!children handles 'postcircumfix:<[ ]>';
has T $.data is rw;
};
my $tree = TreeNode[Int].new;
$tree.data = 3;
$tree[0] = TreeNode[Int].new;
$tree[1] = TreeNode[Int].new;
$tree[0].data = 1;
$tree[1].data = 4;
is ($tree.data, $tree[0,1]>>.data).join(','), '3,1,4',
'parameterized role doing non-parameterized role';

}

#?pugs emit =end SKIP

# vim: ft=perl6

0 comments on commit ddc1d53

Please sign in to comment.