www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7062] New: Void parameter errors with overloaded templates don't indicate instantiation location

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7062

           Summary: Void parameter errors with overloaded templates don't
                    indicate instantiation location
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com



07:35:25 PST ---
This program gives a "cannot have parameter of type void" at line 1, but no
errors at the instantiation site (inside main):

void f(T...)(T a)
if (T.length > 1)
{}

void f(T)(T a)
{}

void g() {}

void main()
{
    f(g());
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 03 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7062


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |FIXED



14:51:35 PDT ---
2.060:

test.d(12): Error: template test.f does not match any function template
declaration
test.d(1): Error: template test.f cannot deduce template function from argument
types !()(void)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 21 2012