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

*$foo accepted in signatures #5656

Open
p6rt opened this issue Sep 11, 2016 · 3 comments
Open

*$foo accepted in signatures #5656

p6rt opened this issue Sep 11, 2016 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 11, 2016

Migrated from rt.perl.org#129245 (status was 'open')

Searchable as RT129245$

@p6rt
Copy link
Author

p6rt commented Sep 11, 2016

From @geekosaur

[11 06​:36] <sammers_> m​: sub subparams(($head, *$tail)) { ($head,
$tail).flat }; say subparams((1,2,3,4));
[11 06​:36] <camelia> rakudo-moar 0a7125​: OUTPUT«Too many positionals
passed; expected 2 arguments but got 4 in sub-signature␤
[11 06​:36] in sub subparams at <tmp> line 1␤
[11 06​:36] in block <unit> at <tmp> line 1␤
[11 06​:36] ␤
[11 06​:36] »
[11 06​:41] <geekosaur> "An array or hash parameter can be marked as slurpy
by leading asterisk(s)" suggests *$ should be illegal
[11 06​:45] <lizmat> geekosaur​: I would tend to agree
[11 06​:46] <lizmat> m​: dd :(*$a) # apparently, it's just $a
[11 06​:46] <camelia> rakudo-moar 0a7125​: OUTPUT«​:($a)␤
[11 06​:46] »

--
brandon s allbery kf8nh sine nomine associates
allbery.b@​gmail.com ballbery@​sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

@p6rt
Copy link
Author

p6rt commented Sep 11, 2016

From @smls

The design docs had a particular behavior in mind for *$ parameters​:

  https://design.perl6.org/S06.html#Unpacking_a_single_list_argument

But it hasn't been implemented (yet?), so yeah, it should be made an error for now.

@p6rt
Copy link
Author

p6rt commented Sep 11, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant