Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required named params not narrower than optional ones? #5688

Open
p6rt opened this issue Sep 21, 2016 · 1 comment
Open

Required named params not narrower than optional ones? #5688

p6rt opened this issue Sep 21, 2016 · 1 comment

Comments

@p6rt
Copy link

p6rt commented Sep 21, 2016

Migrated from rt.perl.org#129329 (status was 'new')

Searchable as RT129329$

@p6rt
Copy link
Author

p6rt commented Sep 21, 2016

From @lizmat

$ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant