Skip Menu |
Report information
Id: 123709
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Sun, 1 Feb 2015 20:47:57 +0100
To: rakudobug [...] perl.org
From: Carl Mäsak <cmasak [...] gmail.com>
Subject: [BUG] LTA error message (for what maybe shouldn't be an error at all) when prefixing a sub name with '&' in Rakudo
Download (untitled) / with headers
text/plain 884b
<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
Still reproducible (2017.11, HEAD(5929887))

On 2015-02-01 11:48:18, masak wrote:
Show quoted text
> <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




This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org