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

for, parens, and lack of whitespace (for(^700){say 2}) #6280

Open
p6rt opened this issue May 27, 2017 · 1 comment
Open

for, parens, and lack of whitespace (for(^700){say 2}) #6280

p6rt opened this issue May 27, 2017 · 1 comment
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented May 27, 2017

Migrated from rt.perl.org#131382 (status was 'new')

Searchable as RT131382$

@p6rt
Copy link
Author

p6rt commented May 27, 2017

From @AlexDaniel

Code​:
for(^700){say 2}

Result​:
===SORRY!=== Error while compiling -e
Undeclared routine​:
  for used at line 1

This just happened on the channel​: https://irclog.perlgeek.de/perl6/2017-05-27#i_14645895

Note that we already have a good error message​:

Code​:
for(^700) {say 2}

Result​:
===SORRY!===
Word 'for' interpreted as 'for()' function call; please use whitespace instead of parens
at -e​:1
------> for⏏(^700) {say 2}
Unexpected block in infix position (two terms in a row)
at -e​:1
------> for(^700)⏏ {say 2}

However, it is not printed if you omit space everywhere.

@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