Please fix bugzilla 107
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sat Sep 30 12:56:58 PDT 2006
Namely, this is the problem where instantiating a template (normally or
through a mixin) from a file different from the template's file causes the
error message location to be wrong. That is:
[file1.d]
module file1;
import std.stdio;
void Foo(T)(T val)
{
static if(!is(T : int))
Error_Wrong_Type(); // "reporting" an error
writefln(val);
}
[file2.d]
module file2;
import file1;
..
Foo(4.5); // line 100
Gives, among other errors, the error
file1.d(100): template instance file1.Foo!(double) error instantiating
Notice that it gives the file where the template is declared, but the _line
of where it's instantiated_, so you end up with a completely bogus location,
making it very difficult to track down where the error actually is.
More information about the Digitalmars-d-bugs
mailing list