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

Perl5-ism regex range detector hides a more useful error #6329

Open
p6rt opened this issue Jun 6, 2017 · 1 comment
Open

Perl5-ism regex range detector hides a more useful error #6329

p6rt opened this issue Jun 6, 2017 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 6, 2017

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

Searchable as RT131517$

@p6rt
Copy link
Author

p6rt commented Jun 6, 2017

From @zoffixznet

https://irclog.perlgeek.de/perl6/2017-06-06#i_14692778

A more useful error in this case would be to say that quotes aren't special in meta chars;
and the "escape it" message should probably mention "with backslash", so the user doesn't think
they can use quotes to escape specialiness of the `-`​:

araraloren m​: say "ABC/as" ~~ m/<-["/" "-" "."]>+/;
camelia rakudo-moar e0f68e​: OUTPUT​: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place it as the first or last thing␤at <tmp>​:1␤------> 3say "ABC/as" ~~ m/<-…»

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant