Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test for RT #74430: index and is copy interaction
  • Loading branch information
timo committed Jan 14, 2013
1 parent 60bc178 commit dee9fde
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S06-traits/is-copy.t
Expand Up @@ -4,7 +4,7 @@ use Test;
# L<S06/"Parameter traits"/"=item is copy">
# should be moved with other subroutine tests?

plan 22;
plan 23;

{
sub foo($a is copy) {
Expand Down Expand Up @@ -107,5 +107,12 @@ plan 22;
is j([1, 2, 3, 4]), '1,2,3,4', 'can use ||= on "is copy" array';
}

# RT #74430
{
sub foo(@items is copy) { @items[0..^1] };
my @items = 'a'...'g';
is foo(@items), 'a', 'can slice "is copy" arrays';
}


# vim: ft=perl6

0 comments on commit dee9fde

Please sign in to comment.