Bug 17400 – put a new line before "candidates are:" in error messages
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2017-05-16T04:28:06Z
Last change time
2021-08-05T09:16:21Z
Keywords
pull
Assigned to
Andrei David
Creator
Zach the Mystic
Comments
Comment #0 by reachzach — 2017-05-16T04:28:06Z
Suggestion: Put a new line or two before "candidates are:", and maybe capitalize it, in the error message for template ambiguity errors. I think they're already hard enough to read, and this might help a little. I made an issue for it, because I don't feel fully qualified to decide on this.
Current template error example:
file(line): Error: template foo cannot deduce function from
argument types !()(int, string), candidates are:
file(line): foo(Args...)(auto ref Args arg) if
(!anySatisfy!(isString, Args))
Recommended change:
file(line): Error: template foo cannot deduce function from
argument types !()(int, string)
Candidates are:
file(line): foo(Args...)(auto ref Args arg) if
(!anySatisfy!(isString, Args))
Or (more spacious):
file(line): Error: template foo cannot deduce function from
argument types !()(int, string)
Candidates are:
file(line): foo(Args...)(auto ref Args arg) if
(!anySatisfy!(isString, Args))
It seems trivial, but little things matter too!
Comment #1 by dlang-bot — 2021-07-25T08:59:00Z
@dandrei279 created dlang/dmd pull request #12915 "[DSSv3] Fix Issue 17400: new line before candidates in error messages" fixing this issue:
- Fix Issue 17400: new line before candidates in error messages
https://github.com/dlang/dmd/pull/12915
Comment #2 by dlang-bot — 2021-08-05T09:16:21Z
dlang/dmd pull request #12915 "[DSSv3] Fix Issue 17400: new line before candidates in error messages" was merged into master:
- be6fba4a8fab9dd00794c063dc805cbf4f8dac80 by Andrei David:
Fix Issue 17400: new line before candidates in error messages
https://github.com/dlang/dmd/pull/12915