I tried to golf this (chained assignment and test failure) a bit and found the following:
$ perl6-m -e 'my $x; $x = 1; my @a; my $y = @a[0] = 2; say @a[0]' 2 $ perl6-m -e 'my $x; ($x) = 1; my @a; my $y = @a[0] = 2; say @a[0]' (Any) The following looks weird as well: $ perl6-m -e 'my $y; my @a = (); $y = @a[0] = 2; say @a[0]' 2 $ perl6-m -e 'my $y; my @a; @a = (); $y = @a[0] = 2; say @a[0]' (Any)
