# New Ticket Created by Rob Hoelz
# Please include the string: [perl #125407]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=125407 >
With this bug, it seems that the following chained assignment:
my $value = @values[0] = @values.pop;
is generated using left-associativity instead of right-associativity.
use v6;
use Test;
plan 1;
my @values = 84, 85;
if False { # note how this never runs
my @ref;
@ref[0] = 1; # commenting out this line, however, fixes the problem
}
# changing this line...
my $value = @values[0] = @values.pop;
# ...to these two fixes the problem
#my $value = @values.pop;
#@values[0] = $value;
is $value, @values[0], '$value and @values[0] should be equal';