Permalink
Browse files

test for RT #74430: index and is copy interaction

  • Loading branch information...
1 parent 60bc178 commit dee9fdeb68bc9447dcd5f92de68290538c0bd4ef @timo timo committed Jan 14, 2013
Showing with 8 additions and 1 deletion.
  1. +8 −1 S06-traits/is-copy.t
View
@@ -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) {
@@ -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.