# New Ticket Created by  Kodi Arfer 
# Please include the string:  [perl #76804]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76804 >


#perl6 on 29 July 2010:

<Kodi> rakudo: sub f($a is copy = 1) { my $b; ($a, $b) = (1, 2);
       say $a; }; f
<p6eval> rakudo 9fd5ea: OUTPUT«1␤»
<Kodi> rakudo: sub f($a is copy = 0) { my $b; ($a, $b) = (1, 2);
       say $a; }; f
<p6eval> rakudo 9fd5ea: OUTPUT«1 2␤»
<Kodi> Known?
<moritz_> Kodi: don't think so
<Kodi> moritz_: Okay, I'll file a rakudobug.

It turns out that the bug has more to do with the value 0
than with default values:

./perl6 -e 'sub f($a is copy) { my $b; ($a, $b) = (1, 2); say $a; }; f(1)'
1
./perl6 -e 'sub f($a is copy) { my $b; ($a, $b) = (1, 2); say $a; }; f(0)'
1 2

Reply via email to