Am 03.05.2010 12:30, schrieb Mark J. Reed:
Huh? Those are explicitly read-write. Why is it dying at all?
Yes. I think masak++ picked up the wrong lines from p6eval:
<@moritz_> rakudo: sub swap($a, $b) { ($a, $b) = ($b, $a) }; swap my $z
= 2, my $y = 5;
<+p6eval> rakudo c4857a: ( no output )
*this* should die.
On Sat, May 1, 2010 at 9:17 AM, Carl Mäsak<[email protected]>wrote:
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #74820]
# in the subject line of all future correspondence about this issue.
#<URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74820>
<moritz_> rakudo: sub swap($a is rw, $b is rw) { ($a, $b) = ($b, $a)
}; swap(3, 4) # should that die?
<p6eval> rakudo c4857a: ( no output )
<moritz_> I'm quite sure it should :/
<masak> aye, me too.
* moritz_ predicts masak's next line
* masak does the thing that fulfills that prediction
<masak> rakudo: sub foo($a is rw) { $a = 5 }; foo(42)
<p6eval> rakudo c4857a: OUTPUT«Cannot assign to readonly value
<masak> rakudo: (1, 2) = 3, 4
<p6eval> rakudo c4857a: ( no output )
<masak> ok, so it's the list assignment that doesn't pick up on non-rw
values.