www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6539] New: Incomprehensible error message with failed template instantiation

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



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: -------
Aug 20 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6539


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
           Platform|Other                       |All
         OS/Version|Windows                     |All



https://github.com/D-Programming-Language/dmd/pull/1661

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 15 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6539




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/652c113648fccd075c029a2915cf349b5f72688c
fix Issue 6539 - Incomprehensible error message with failed template
instantiation

https://github.com/D-Programming-Language/dmd/commit/bf14ab826f3ef60b856d8265e8a8cf3e55ea2f70


Issue 6539 - Incomprehensible error message with failed template instantiation

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 17 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6539


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 18 2013