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

&sub.arity doesn't treat named parameters as optional #522

Closed
p6rt opened this issue Dec 22, 2008 · 4 comments
Closed

&sub.arity doesn't treat named parameters as optional #522

p6rt opened this issue Dec 22, 2008 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Dec 22, 2008

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

Searchable as RT61606$

@p6rt
Copy link
Author

p6rt commented Dec 22, 2008

From @moritz

Rakudo (r34146) correctly excludes optional arguments from its counting,
but not named ones, which are also optional​:

$ ./perl6 -e 'sub a($x, $y?) { }; sub b ($x, :$y) { }; say &a.arity; say
&b.arity'
1
2 # should be 1 as well
$

Tests are in t/spec/S06-signature/arity.t

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Dec 22, 2008

From @pmichaud

On Mon Dec 22 06​:24​:11 2008, moritz wrote​:

Rakudo (r34146) correctly excludes optional arguments from its counting,
but not named ones, which are also optional​:

$ ./perl6 -e 'sub a($x, $y?) { }; sub b ($x, :$y) { }; say &a.arity; say
&b.arity'
1
2 # should be 1 as well
$

Now fixed in r34248, thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Dec 22, 2008

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

@p6rt
Copy link
Author

p6rt commented Dec 22, 2008

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

@p6rt p6rt closed this as completed Dec 22, 2008
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