On Sun Feb 02 13:28:22 2014, masak wrote:
> <masak> TimToady: ok, now I'm backlogging. I see a lot of trying stuff
> out, but any bug is lost in the noise.
> <masak> TimToady: do you think you could rebase the bug on the
> present? ;)
> <TimToady> r: class A { submethod BUILD(:$!v){ }; has $.v; method
> new(*%_) { say 'OH HAI!'; nextwith(|%_, :v<test>); }; }; class B is A
> { has $.newfiled }; my $b = B.new(:v('do you see me?'),:newfiled(43));
> say 'v: ' ~ $b.v; say 'newfiled: ' ~ $b.newfiled;
> <camelia> rakudo-jvm 535d91: OUTPUT«OH HAI!␤v: test␤newfiled: 43␤»
> <camelia> ..rakudo-moar 535d91: OUTPUT«OH HAI!␤v: do you see
> me?␤newfiled: 43␤»
> <camelia> ..rakudo-parrot 535d91: OUTPUT«OH HAI!␤duplicate named
> argument in call␤  in method new at /tmp/tmpfile:1␤  in block  at
> /tmp/tmpfile:1␤␤»
> <TimToady> that one
> * masak peers at it
> <masak> ah.
> <masak> something is definitely up with that one. :)
> * masak submits rakudobug
> <masak> r: class A { submethod BUILD(:$!v){ }; has $.v; method
> new(*%_) { nextwith(|%_, :v<bar>); }; }; class B is A {}; my $b =
> B.new(:v('foo')); say $b.v
> <camelia> rakudo-jvm 535d91: OUTPUT«bar␤»
> <camelia> ..rakudo-parrot 535d91: OUTPUT«duplicate named argument in
> call␤  in method new at /tmp/tmpfile:1␤  in block  at
> /tmp/tmpfile:1␤␤»
> <camelia> ..rakudo-moar 535d91: OUTPUT«foo␤»
> <masak> slightly minimaler.
> <timotimo> hooray
> <diakopter> wat :)
> <masak> anyway, in the above WAT, I think Parrot is obviously wrong,
> so let's drop that one out of the contest.
> <masak> between the other two, JVM makes the most sense to me.
> 
> At least two of them is wrong. I think rakudo-jvm is right, above.

This isn't actually anything to do with nextwith, but in fact the named arg 
flattening order bug in disguise:

17:11 < jnthn> r: sub s_s(*%n)  { %n>>.say }; s_s(|{:assoc<list>},:assoc<left>);
17:11 < camelia> rakudo-moar 019a7f: OUTPUT«list␤»
17:11 < camelia> ..rakudo-jvm f0c6a0: OUTPUT«left␤»

So, merging it into that ticket.

/jnthn

Reply via email to