[Issue 13942] New: Bad template error message
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jan 5 15:05:53 PST 2015
https://issues.dlang.org/show_bug.cgi?id=13942
Issue ID: 13942
Summary: Bad template error message
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at benjamin-thaut.de
The following code:
import std.conv;
void main(string[] args)
{
auto t = to!double();
}
Gives the error message when compiled with dmd 2.066:
/usr/include/dlang/dmd/std/conv.d(278): Error: template instance
isRawStaticArray!() does not match template declaration isRawStaticArray(T,
A...)
When compiling with dmd 2.065:
/opt/compilers/dmd2/include/std/conv.d(280): Error: template instance
isRawStaticArray!() does not match template declaration isRawStaticArray(T,
A...) test.d(5): Error: template std.conv.to cannot deduce function from
argument types !(double)(), candidates are:
/opt/compilers/dmd2/include/std/conv.d(277): std.conv.to(T)
The error message from dmd 2.065 is cleary better and actually points to the
correct file/line where the issue is located. The error dmd 2.066 gives is
completely useless in actually finding the issue.
--
More information about the Digitalmars-d-bugs
mailing list