Skip Menu |
Report information
Id: 127857
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

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



Subject: LTA error message when using commas in c-style “loop” (loop (my $x = 0, $x < 10, $x++) {})
Download (untitled) / with headers
text/plain 298b
Code: loop (my $x = 0, $x < 10, $x++) {} Result: ===SORRY!=== Error while compiling -e Malformed loop spec at -e:1 ------> loop (my $x = 0, $x < 10, $x++⏏) {} The error message is not bad at all. But it would be awesome if it could detect that the programmer used commas instead of semicolons.
There is a PR but it's really bad: https://github.com/rakudo/rakudo/pull/1188

On 2016-04-07 17:05:15, alex.jakimenko@gmail.com wrote:
Show quoted text
> Code:
> loop (my $x = 0, $x < 10, $x++) {}
>
> Result:
> ===SORRY!=== Error while compiling -e
> Malformed loop spec
> at -e:1
> ------> loop (my $x = 0, $x < 10, $x++⏏) {}
>
>
> The error message is not bad at all. But it would be awesome if it
> could detect that the programmer used commas instead of semicolons.


On a slightly more positive note, that PR indeed resolves this ticket. I think the new error message is clear enough.

On 2017-10-08 00:52:36, alex.jakimenko@gmail.com wrote:
Show quoted text
> There is a PR but it's really bad:
> https://github.com/rakudo/rakudo/pull/1188
>
> On 2016-04-07 17:05:15, alex.jakimenko@gmail.com wrote:
> > Code:
> > loop (my $x = 0, $x < 10, $x++) {}
> >
> > Result:
> > ===SORRY!=== Error while compiling -e
> > Malformed loop spec
> > at -e:1
> > ------> loop (my $x = 0, $x < 10, $x++⏏) {}
> >
> >
> > The error message is not bad at all. But it would be awesome if it
> > could detect that the programmer used commas instead of semicolons.




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