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 Issue 21738 - std.format.spec: singleSpec should throw on "%%" #7894
Conversation
Thanks for your pull request and interest in making D better, @wolframw! 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 references
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 + phobos#7894" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to reword the commit message to start with "Fix issue 21738". So the bot will auto close the issue. All else is fine.
std/format/spec.d
Outdated
A `FormatException` when more than one specifier is given or the specifier | ||
is malformed. | ||
A `FormatException` when more than one specifier is given, the specifier | ||
is malformed, or when the specifier is "%%". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is malformed, or when the specifier is "%%". | |
is malformed or when the specifier is "%%". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With #7891 being merged, this isn't relevant anymore. There are more cases, where a FormatException
can be thrown, so I used a more general term there and there is no need any more to write anything about %%
.
But: When handling the merge conflicts, the "Known Bug" section should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads-up.
singleSpec
doesn't work with "%%" since it doesn't really "do" anything. Therefore,singleSpec
is changed to throw aFormatException
if "%%" is passed as format specifier.