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

Less than helpful error message when writing %*foo instead of *%foo in parameter list in Rakudo #1282

Closed
p6rt opened this issue Sep 16, 2009 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 16, 2009

Migrated from rt.perl.org#69176 (status was 'rejected')

Searchable as RT69176$

@p6rt
Copy link
Author

p6rt commented Sep 16, 2009

From @masak

$ perl6 -e 'class A { method foo(%*opts) {} }'
Invalid twigil used in signature parameter. at line 1, near ") {} }"

Suggest making the error message include "did you mean '*%opts'?".

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

From @coke

On Wed Sep 16 14​:47​:06 2009, masak wrote​:

$ perl6 -e 'class A { method foo(%*opts) {} }'
Invalid twigil used in signature parameter. at line 1, near ") {} }"

Suggest making the error message include "did you mean '*%opts'?".

This doesn't error now​:

$ ./perl6 -e 'class A { method foo(%*opts) {} }'
$

the * twigil refers to a dynamically overridable global variable. Not
sure if this makes sense in a signature, though.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

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

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

From @pmichaud

On Wed Jul 28 07​:44​:27 2010, coke wrote​:

On Wed Sep 16 14​:47​:06 2009, masak wrote​:

$ perl6 -e 'class A { method foo(%*opts) {} }'
Invalid twigil used in signature parameter. at line 1, near ") {} }"

Suggest making the error message include "did you mean '*%opts'?".

This doesn't error now​:

$ ./perl6 -e 'class A { method foo(%*opts) {} }'
$

the * twigil refers to a dynamically overridable global variable. Not
sure if this makes sense in a signature, though.

The * twigil is allowed in parameter declarations. STD.pm6 and Rakudo
both make use of this in several places.

Pm

@p6rt
Copy link
Author

p6rt commented Aug 1, 2010

From @masak

On Wed Jul 28 10​:01​:02 2010, pmichaud wrote​:

On Wed Jul 28 07​:44​:27 2010, coke wrote​:

On Wed Sep 16 14​:47​:06 2009, masak wrote​:

$ perl6 -e 'class A { method foo(%*opts) {} }'
Invalid twigil used in signature parameter. at line 1, near ") {} }"

Suggest making the error message include "did you mean '*%opts'?".

This doesn't error now​:

$ ./perl6 -e 'class A { method foo(%*opts) {} }'
$

the * twigil refers to a dynamically overridable global variable. Not
sure if this makes sense in a signature, though.

The * twigil is allowed in parameter declarations. STD.pm6 and Rakudo
both make use of this in several places.

Well, then. Whoever submitted this ticket should have known better. Rejected! :)

@p6rt
Copy link
Author

p6rt commented Aug 1, 2010

@masak - Status changed from 'open' to 'rejected'

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