Skip to content

Commit

Permalink
Test xx not keeping containers around
Browse files Browse the repository at this point in the history
Closes RT#130941.
  • Loading branch information
AlexDaniel committed Apr 7, 2018
1 parent 3b1e5fb commit 1a42efd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S03-operators/repeat.t
Expand Up @@ -9,7 +9,7 @@ Repeat operators for strings and lists
=end description

plan 61;
plan 62;

#L<S03/Changes to Perl 5 operators/"x (which concatenates repetitions of a string to produce a single string">

Expand Down Expand Up @@ -204,4 +204,13 @@ is-deeply (|() xx *)[^5], (Nil, Nil, Nil, Nil, Nil),
is-deeply @result.map(*.list).list, (((1, 1), (1, 1)), ((1, 1), (1, 1))),
'Nested xx in for-loop';
}

# RT #130941
{
my $y = 25;
my $z = $y xx 1;
$y = '';
is $z, 25, 'xx does not keep containers around';
}

# vim: ft=perl6

0 comments on commit 1a42efd

Please sign in to comment.