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

Bogus error when putting the named slurpy *%_ before the positional slurpy *@_ in Rakudo #4364

Closed
p6rt opened this issue Jun 30, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 30, 2015

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

Searchable as RT125513$

@p6rt
Copy link
Author

p6rt commented Jun 30, 2015

From @masak

<masak> m​: class C { method foo(*%_, *@​_) { say "OH HAI" } }; C.new.foo
<camelia> rakudo-moar 7b5256​: OUTPUT«===SORRY!===␤Lexical '%_' already
declared␤»
* masak submits rakudobug
<masak> S06​:1105​: sub duplicate($n, *%flag, *@​data) {...}
<masak> so it's allowed.

The source code in World.nqp assumes that the named slurpy is in
@​params[+@​params - 1], which isn't necessarily the case, as the spec
allows named slurpies and positional slurpies to appear in any order.

@p6rt
Copy link
Author

p6rt commented Jul 9, 2015

From @jnthn

On Tue Jun 30 00​:55​:36 2015, masak wrote​:

<masak> m​: class C { method foo(*%_, *@​_) { say "OH HAI" } }; C.new.foo
<camelia> rakudo-moar 7b5256​: OUTPUT«===SORRY!===␤Lexical '%_' already
declared␤»
* masak submits rakudobug
<masak> S06​:1105​: sub duplicate($n, *%flag, *@​data) {...}
<masak> so it's allowed.

The source code in World.nqp assumes that the named slurpy is in
@​params[+@​params - 1], which isn't necessarily the case, as the spec
allows named slurpies and positional slurpies to appear in any order.

Fixed, and test added in S12-class/interface-consistency.t.

@p6rt
Copy link
Author

p6rt commented Jul 9, 2015

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

@p6rt
Copy link
Author

p6rt commented Jul 9, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jul 9, 2015
@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