Navigation Menu

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

List in a named argument shouldn't need extra parens. #1383

Closed
p6rt opened this issue Oct 30, 2009 · 3 comments
Closed

List in a named argument shouldn't need extra parens. #1383

p6rt opened this issue Oct 30, 2009 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Oct 30, 2009

Migrated from rt.perl.org#70119 (status was 'resolved')

Searchable as RT70119$

@p6rt
Copy link
Author

p6rt commented Oct 30, 2009

From lewis@wall.org

[17​:48] <quietfanatic> rakudo​: sub x (​:@​args) { say @​args.perl }; x :args(3,
4)
[17​:48] <+p6eval> rakudo 432047​: OUTPUT«Nominal type check failed for
parameter '@​args'; expected Positional but got Int instead␤in Main (file
src/gen_setting.pm, line 324)␤»
[17​:48] <quietfanatic> rakudo​: sub x (​:@​args) { say @​args.perl }; x
:args((3, 4))
[17​:49] <+p6eval> rakudo 432047​: OUTPUT«[3, 4]␤»
[17​:49] <quietfanatic> This isn't supposed to work that way is it?
[17​:50] <@​jnthn> quietfanatic​: That looks a tad dubious...
[17​:50] <quietfanatic> a comma is an operator that produces a list. The
parens shouldn't be what does it...
[17​:50] <@​jnthn> Aye.
[17​:50] <@​jnthn> Looks like a fail.

@p6rt
Copy link
Author

p6rt commented Mar 21, 2010

From @moritz

Works now in Rakudo, and tested in S06-signature/named-parameters.t.

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Mar 21, 2010

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Mar 21, 2010
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