Bad error message example
Benjamin Thaut via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jan 5 09:40:38 PST 2015
Today I had a bad template error message and I though I might post it
here so something can be done about it, the error message was:
/usr/include/dlang/dmd/std/conv.d(278): Error: template instance
isRawStaticArray!() does not match template declaration
isRawStaticArray(T, A...)
I was not using isRawStaticArray anywhere in my code. And the error was
generally not helpfull at all and yes that was all of it. So after
staring at my source file for 10 minutes I finally found the line that
caused the error:
s.amount = to!double();
I accidentally deleted the contents between the two parentheses. It
would be great if dmd would give a more meaningfull error message in
this case. Why are the "instanciated from" messages sometimes given and
sometimes not?
Kind Regards
Benjamin Thaut
More information about the Digitalmars-d
mailing list