www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6061] New: cannot implicitly convert expression (test1) of type Test1() to Test1

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

           Summary: cannot implicitly convert expression (test1) of type
                    Test1() to Test1
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: changlon gmail.com



struct Test1{
    int i ;
}
Test1 test1(char[] T)(){
    return Test1.init ;
}
static const Test1 my_test1 = test1!("123") ;

void main(){}
-----------------------------------------------
t1.d(7): Error: template instance test1!("123") does not match template
declaration test1(char[] T)

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




Sorry , It is a dmd1 bug, the error message is : 

t1.d(8): Error: cannot implicitly convert expression (test1) of type Test1() to
Test1

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 26 2011