# New Ticket Created by Moritz Lenz
# Please include the string: [perl #53904]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53904 >
rakudo as of r27393
class Foo {
has $.a;
has $.b;
}
my $x = Foo.new(a => 1, b => 2);
say $x.a;
say $x.b;
Output:
1
# end of output. Empty line above.
Now if b => 2 is passed as the first parameter:
class Foo {
has $.a;
has $.b;
}
my $x = Foo.new(b => 2, a => 1);
say $x.a;
say $x.b;
Output:
2
# end of output.
The order of declaration of $.a and $.b doesn't seem to matter.
--
Moritz Lenz
http://moritz.faui2k3.org/ | http://perl-6.de/
Thread Next