On Sun Dec 12 03:09:07 2010, moritz wrote: > 12:05 < moritz_> rakudo: my @a = 1, 2, 3; my @b; my $c = @b[0] = @a[1]; > say $c; say @b[0]; > 12:05 <+p6eval> rakudo : OUTPUT«2Any()» > > both should be 2 > > 12:04 < moritz_> rakudo: my @b; my $c = @b[0] = 1; say $c; say @b[0]; > 12:04 <+p6eval> rakudo : OUTPUT«11» > > ... and it works fine if the right-most term is not an array item, but > rather a scalar. > > Found while pursuing masak's coding contest, problem 5. > > Cheers, > Moritz
A test for this was added to S03-operators/assign.t - 2 tests in a block - one passes, one fails (and is todo'd) - but if you run that test directly (hoisting it out into its own file), it passes. very odd. -- Will "Coke" Coleda
