-
-
Notifications
You must be signed in to change notification settings - Fork 667
Improve template error msg #22310
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
base: master
Are you sure you want to change the base?
Improve template error msg #22310
Conversation
…into improve-error-msg
|
Thanks for your pull request and interest in making D better, @Iskaban10! 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.
|
compiler/src/dmd/funcsem.d
Outdated
| return "Candidate is: "; | ||
| else | ||
| { | ||
| fprintf(stderr,"\tThere are multiple candidates\n"); |
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.
All diagnostics have to go via the appropriate machinery, not raw printfs.
For example so that it doesn't mess up diagnostics in json or sarif format.
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.
I have used the fprintf to print just the header for the diagnostic message. Passing it through error() function would require unavailable location parameters for the header message.
…into improve-error-msg
fix #21216