-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
Fix missing backtick in escape.d error message #20677
Conversation
Thanks for your pull request and interest in making D better, @dkorpel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#20677" |
@dkorpel FYI, I expect these tests to fail.
|
Doesn't have to be addressed in this PR, one good way to prevent this from recurring is to copy the strict backtick checking from gdc. Here is where dmd does backtick highlighting. Lines 837 to 871 in ca01894
At the end of the function there could be an assert to ensure |
ff72385
to
3c13e7c
Compare
Wouldn't that trigger when an argument contains a single backtick? For example: int x = "`";
|
The format string for that is
So unless highlighting is done after all format specifiers are expanded, then there shouldn't be a problem. Didn't check too closely what dmd is doing. |
It's doing syntax highlighting after expanding. Also, some messages are formatted with OutBuffer.printf and passed to error() as a single complete string. |
Alright, so there's something more fundamentally the issue. Will not push the matter for now then. :-) BTW, gdc rewrites the format string as:
then gcc has it's own printf-style routines that expand it to the right thing. |
No description provided.