[Issue 2393] New: IFTI regression on (T:char)(T[]) vs (T:dchar)(T[])

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 4 15:05:01 PDT 2008


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

           Summary: IFTI regression on (T:char)(T[]) vs (T:dchar)(T[])
           Product: D
           Version: 1.033
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: business3 at twistedpairgaming.com


The following code worked fine in 1.029, but is broken in 1.033 and 1.035 (no
other versions tested):

void fooA(T:char) (T chr) { }
void fooA(T:dchar)(T chr) { }

void fooB(T:char) (T[] str) { }
void fooB(T:dchar)(T[] str) { }

void main()
{
        // Ok in all versions
        fooA('c');

        // DMD 1.029: Ok
        // DMD 1.033 and 1.035: template main.fooB(T : char) fooB(T : char)
matches more than one function template declaration, fooB(T : char) and fooB(T
: dchar)
        fooB("str"c);
}


-- 



More information about the Digitalmars-d-bugs mailing list