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 writing phasers like BEGIN in lower case, does not suggest the correct spelling #4614

Closed
p6rt opened this issue Oct 5, 2015 · 6 comments
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded

Comments

@p6rt
Copy link

p6rt commented Oct 5, 2015

Migrated from rt.perl.org#126264 (status was 'resolved')

Searchable as RT126264$

@p6rt
Copy link
Author

p6rt commented Oct 5, 2015

From @quester

If you absent-mindedly type in keywords that should be capitalized in lower case, the compiler will not suggest the correct upper case form. For example​:

$ perl6

say EVAL "2+2";
4
say eval "2+2";
===SORRY!=== Error while compiling <unknown file>
Undeclared routine​:
  eval used at line 1. Did you mean 'val'?

BEGIN {say pi}
3.14159265358979
begin {say pi}
===SORRY!=== Error while compiling <unknown file>
Undeclared routine​:
  begin used at line 1

Best regards,
quester

@p6rt
Copy link
Author

p6rt commented May 6, 2016

From @smls

Rakudo now suggests `EVAL` when you type `eval`​:

  ➜ eval "say 42"
  ===SORRY!=== Error while compiling -e
  Undeclared routine​:
  eval used at line 1. Did you mean 'EVAL', 'val'?

However, it still does not suggest the correct spelling when you lowercase `BEGIN` (or other phasers, like `CATCH`).

@p6rt
Copy link
Author

p6rt commented May 6, 2016

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

@p6rt
Copy link
Author

p6rt commented Aug 16, 2016

From @lizmat

Fixed with 1728139 , tests needed, MasterDuke17++ for actual code.

On 05 Oct 2015, at 08​:18, quester (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by quester
# Please include the string​: [perl #​126264]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126264 >

If you absent-mindedly type in keywords that should be capitalized in lower case, the compiler will not suggest the correct upper case form. For example​:

$ perl6

say EVAL "2+2";
4
say eval "2+2";
===SORRY!=== Error while compiling <unknown file>
Undeclared routine​:
eval used at line 1. Did you mean 'val'?

BEGIN {say pi}
3.14159265358979
begin {say pi}
===SORRY!=== Error while compiling <unknown file>
Undeclared routine​:
begin used at line 1

Best regards,
quester

@p6rt
Copy link
Author

p6rt commented Sep 10, 2016

From @zoffixznet

Tests added in Raku/roast@50b60804b3

@p6rt p6rt closed this as completed Sep 10, 2016
@p6rt
Copy link
Author

p6rt commented Sep 10, 2016

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt added LTA Less Than Awesome; typically an error message that could be better testneeded labels 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 testneeded
Projects
None yet
Development

No branches or pull requests

1 participant