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

error message (for what maybe shouldn't be an error at all) when prefixing a sub name with '&' in Rakudo #3664

Open
p6rt opened this issue Feb 1, 2015 · 3 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Feb 1, 2015

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

Searchable as RT123709$

@p6rt
Copy link
Author

p6rt commented Feb 1, 2015

From @masak

<masak> m​: sub &foo() {}; say "alive"
<camelia> rakudo-moar 6e182d​: OUTPUT«===SORRY!=== Error while
compiling /tmp/GE7JBiJGWP␤Missing block␤at ------> sub ⏏&foo() {}; say
"alive"␤ expecting any of​:␤ new name to be defined␤»
<masak> (a) I'm wondering if this shouldn't be allowed, and mean the
same as `sub foo`
<masak> (b) the error message is LTA, but I don't have any good ideas
for what it ought to be
<raydiak> wrt (b), maybe "invalid sub name" or "invalid character in
sub name" or along those lines? perhaps additionally a specific
mention of no leading '&' if that's the first char it saw in the name?
<raydiak> I guess it'll be the same message we see when botching the
body of an anonymous sub too, though...
* raydiak wouldn't mind allowing a leading &, either, but the message
will still be LTA in other cases
<masak> troo
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

From @AlexDaniel

Still reproducible (2017.11, HEAD(5929887))

On 2015-02-01 11​:48​:18, masak wrote​:

<masak> m​: sub &foo() {}; say "alive"
<camelia> rakudo-moar 6e182d​: OUTPUT«===SORRY!=== Error while
compiling /tmp/GE7JBiJGWP␤Missing block␤at ------> sub ⏏&foo() {}; say
"alive"␤ expecting any of​:␤ new name to be defined␤»
<masak> (a) I'm wondering if this shouldn't be allowed, and mean the
same as `sub foo`
<masak> (b) the error message is LTA, but I don't have any good ideas
for what it ought to be
<raydiak> wrt (b), maybe "invalid sub name" or "invalid character in
sub name" or along those lines? perhaps additionally a specific
mention of no leading '&' if that's the first char it saw in the name?
<raydiak> I guess it'll be the same message we see when botching the
body of an anonymous sub too, though...
* raydiak wouldn't mind allowing a leading &, either, but the message
will still be LTA in other cases
<masak> troo
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

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

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant