Skip Menu |
Report information
Id: 129329
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: elizabeth <liz [at]>

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Subject: Required named params not narrower than optional ones?
Date: Wed, 21 Sep 2016 22:47:45 +0200
From: Elizabeth Mattijsen <liz [...]>
To: rakudobug [...]
Download (untitled) / with headers
text/plain 672b
$ perl6 -e 'multi a($a,:$enc,|c) { "enc" }; multi a($a,:$gzip!,|c) { "gzip" }; say a("foo",:gzip)’ enc $ perl6 -e 'multi a($a,:$gzip!,|c) { "gzip" }; multi a($a,:$enc,|c) { "enc" }; say a("foo",:gzip)’ gzip In both cases I would expect to see “gzip”. But apparently the order in which the candidates occur is important, even though one would expect the required named to be tighter? Of course, on could order the candidates so that the required nameds are seen first. However, that’s not an option if the first candidates are actually part of the setting :-( Which makes it quite hard to actually add candidates with extra nameds for builtins :-( Liz

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at