Misleading error in tr/// when including a # character #2118
Labels
regex
Regular expressions, pattern matching, user-defined grammars, tokens and rules
smartmatch
Smart matching with ~~ and .ACCEPTS methods
tests needed
Issue is generally resolved but tests were not written yet
transliteration
The Problem
Misleading error message for # in a tr/TR.
The error message indicates "Please backslash # for literal char or put whitespace in front for comment".
However, adding a backslash just generates the same error message.
Expected Behavior
I'm not entirely sure what the proper behavior of a backslash in a TR should be. When working on #2117, I was trying to generate errors based on unrecognized backslash sequences to test the PR, but was not able to trigger that condition.
My expectations (which may be wrong) would be that either the backslash in front of # should work and quiet this error or the error message should be changed.
Actual Behavior
Without backslash:
With backslash:
Steps to Reproduce
See above.
Environment
perl6 -v
): HEAD & 18.06The text was updated successfully, but these errors were encountered: