www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11118] New: undefined identifier in template structs functions

http://d.puremagic.com/issues/show_bug.cgi?id=11118

           Summary: undefined identifier in template structs functions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code.viator gmail.com


--- Comment #0 from Oleg B <code.viator gmail.com> 2013-09-24 14:26:37 PDT ---
[code]
struct img(size_t DIM)
{
    void setSize(E)( E[DIM] sz... ) {}
}

void main()
{
    img!2 x;
    x.setSize( 10u, 10u );
}
[/code]

compiler return:

bug.d(9): Error: undefined identifier DIM
bug.d(9): Error: template bug.img!(2).img.setSize does not match any function
template declaration. Candidates are:
bug.d(3):        bug.img!(2).img.setSize(E)(E[DIM] sz...)
bug.d(9): Error: template bug.img!(2).img.setSize(E)(E[DIM] sz...) cannot
deduce template function from argument types !()(uint, uint)

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