Permalink
Browse files

RT #82810, ||= on an "is copy" array parameter

  • Loading branch information...
1 parent bddc607 commit ba5ee931efa43a3fd6fcc64d69723bd2476726a4 @moritz moritz committed Jan 30, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −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 21;
+plan 22;
{
sub foo($a is copy) {
@@ -99,5 +99,11 @@ plan 21;
is h(*), 'abc', 'can re-assign to "is copy" parameter that held a Whatever';
}
+# RT #82810
+{
+ sub i(@a is copy) { @a ||= -1, -1, +1, +1; @a.join(',') }
+ is i([1, 2, 3, 4]), '1,2,3,4', 'can use ||= on "is copy" array';
+}
+
# vim: ft=perl6

0 comments on commit ba5ee93

Please sign in to comment.