# New Ticket Created by  Alex Elsayed 
# Please include the string:  [perl #68138]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=68138 >


This code fails. Moritz believes it to be due to T not being bound when 
Positional[T] appears. Also, the error has no line number.

role TreeNode[::T] does Positional[T] {
        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;
.say for $tree.data, $tree[0,1]>>.data;

Attachment: signature.asc
Description: PGP signature

Reply via email to