Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[assign] Test for RT 80614: chained array item assignment
  • Loading branch information
kyleha committed Dec 23, 2010
1 parent 98abe8e commit 1e438c8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S03-operators/assign.t
Expand Up @@ -6,7 +6,7 @@ use Test;
# V
# L<S03/Changes to Perl 5 operators/list assignment operator now parses on the right>

plan 242;
plan 244;


# tests various assignment styles
Expand Down Expand Up @@ -764,4 +764,15 @@ sub l () { 1, 2 };
is $x, 5, '... with correct result';
}

# RT #80614
{
my @a = 1,2,3;
my @b;
my $rt80614 = @b[0] = @a[1];

is $rt80614, 2, 'assignment to scalar via array item from array item';
#?rakudo todo 'RT 80614'
is @b[0], 2, 'assignment to array item from array item to scalar';
}

# vim: ft=perl6

0 comments on commit 1e438c8

Please sign in to comment.