[Issue 1144] New: template mixin causes DMD crash

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 14 11:40:19 PDT 2007


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

           Summary: template mixin causes DMD crash
           Product: D
           Version: 1.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: CppCoder at gmail.com


template testHelper( A ... )
{
        char []testHelper()
        {
                char []result;
                foreach(  t; a )
                {
                        result ~= "int " ~ t ~ ";\r\n";
                }
                return result;
        }
}

template test( A ... )
{
        const char []test = testHelper( A );
}

int main( char [][]args )
{
        mixin( test!( "hello", "world" ) );
        return 0;
}


-- 



More information about the Digitalmars-d-bugs mailing list