Bug 2902 – improve error message with template

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-04-25T23:13:00Z
Last change time
2015-06-09T01:26:26Z
Keywords
diagnostic
Assigned to
bugzilla
Creator
someanon

Comments

Comment #0 by someanon — 2009-04-25T23:13:42Z
the following message is very hard to track down the issue: dmd/linux/bin/../bin/../../src/phobos/std/stdio.d(511): Error: template std.format.formattedWrite(Writer,F,A...) does not match any function template declaration dmd/linux/bin/../bin/../../src/phobos/std/stdio.d(511): Error: template std.format.formattedWrite(Writer,F,A...) cannot deduce template function from argument types !()(LockingTextWriter,int,immutable(char)[]) It's better to also pin-point where is the caller: writefln.
Comment #1 by smjg — 2009-04-26T11:11:09Z
Now try telling the rest of us what you're trying to compile when these messages appear.
Comment #2 by someanon — 2009-04-26T13:03:02Z
(In reply to comment #1) > Now try telling the rest of us what you're trying to compile when these > messages appear. > I don't know! The compiler should tell me where is caller is! That's exactly why I'm logging this bug. When I upgrade the compiler it suddenly have this error, it's hard to dig into thousands of lines of my code to find out which writefln is causing the problem.
Comment #3 by fvbommel — 2009-04-26T15:04:27Z
What you're asking for is a template instantiation backtrace, making this a dupe of bug 2510. *** This bug has been marked as a duplicate of 2510 ***