[Issue 6539] New: Incomprehensible error message with failed template instantiation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 20 15:16:08 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6539
Summary: Incomprehensible error message with failed template
instantiation
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-08-20 15:16:05 PDT ---
foo.d:
struct Rectangle(T) {}
bar.d:
bool Rectangle(bool, int, int, int, int);
main.d:
module main;
import foo;
import bar;
void test(Rectangle rect)
{
}
$ rdmd main.d
main.d(6): Error: overloadset __anonymous is used as a type
I've had this happen where I've used CairoD and WindowsAPI together. A
templated struct and a function have the same name in different modules.
My error is that I forgot to instantiate the template with a type, like so:
void test(Rectangle!int rect)
{
}
But the error message doesn't help one bit.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list