On Sun Aug 02 14:02:30 2009, eternal...@gmail.com wrote: > 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;
Current failure mode is: Cannot call a method on type variable T in any find_method at src/gen/Metamodel.pm:282 in <anon> at src/gen/Metamodel.pm:1614 in <anon> at src/gen/Metamodel.pm:1610 in any accepts_type at src/gen/Metamodel.pm:1608 in method at_pos at src/gen/CORE.setting:5858 in method at_pos at src/gen/CORE.setting:1252 in method postcircumfix:<[ ]> at src/gen/CORE.setting:1211 in method postcircumfix:<[ ]> at src/gen/CORE.setting:196 in block <anon> at foo.pl:7 -- Will "Coke" Coleda