develooper Front page | perl.perl6.compiler | Postings from June 2012

[perl #113546] Duplicate flattened nameds aren't filtered out

From:
Kristof Bogaerts
Date:
June 8, 2012 01:04
Subject:
[perl #113546] Duplicate flattened nameds aren't filtered out
Message ID:
rt-3.6.HEAD-5009-1339099667-431.113546-82-0@perl.org
# New Ticket Created by  Kristof Bogaerts 
# Please include the string:  [perl #113546]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113546 >


p6: sub s_s(*%n)  { %n>>.say }; s_s(|{:assoc<list>}, :assoc<left>); #
which one is correct?
rakudo e75a0a: OUTPUT«duplicate named argument in call␤  in block
<anon> at /tmp/ohG08nWXj0:1␤␤»
niecza v18-6-ge52d6c3: OUTPUT«left␤» 21:54:05

p6: sub s_s(*%n)  { %n>>.say }; s_s(:assoc<list>, :assoc<left>);	
rakudo e75a0a, niecza v18-6-ge52d6c3: OUTPUT«left␤»

jnthn:
Rakudo has inconsistent behavior in that areas.
For non-flattened nameds it filters out the dupes
Flattened ones it can't do that, and Parrot barfs on dupe named args.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About