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 when forgetting the initial curly quote (say hello world’) #6265

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

Comments

@p6rt
Copy link

p6rt commented May 25, 2017

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

Searchable as RT131360$

@p6rt
Copy link
Author

p6rt commented May 25, 2017

From @AlexDaniel

Code​:
say hello world�

Result​:
===SORRY!=== Error while compiling -e
Bogus postfix
at -e​:1
------> say hello world��
  expecting any of​:
  infix
  infix stopper
  postfix
  statement end
  statement modifier
  statement modifier loop

The way I see this error message is that it is effectively equivalent to just saying �Confused�. However, in this case it is most likely that somebody forgot to write an initial quote (�), so the error message can say exactly that.

Please note that starting a string literal with � is also possible (e.g. say hello �foo�), so there is a chance that this new error message will be wrong sometimes. I don't know if that would be a problem.

This bug report is motivated by this task from the thinkperl6 book​:

1. If you are trying to print a string, what happens if you leave out one of the quotation marks, or both?

@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