www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1239] New: ICE when empty tuple is passed to variadic template function

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

           Summary: ICE when empty tuple is passed to variadic template
                    function
           Product: D
           Version: 1.014
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: manuelk89 gmx.net


template Tuple(E...)
{
        alias E Tuple;
}

// variadic template function
void VarArg(T...)(T args)
{

}

void main()
{
        // called with empty tuple:
        VarArg( Tuple!()      ); // ICE

        VarArg( );               // ok
        VarArg( Tuple!(1,2,3) ); // ok
}

---------------------------

dmd output:

dmd: template.c:3189: Identifier* TemplateInstance::genIdent(): Assertion
`global.errors' failed.
Aborted (core dumped)


-- 
May 17 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1239


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.018 and DMD 2.002


-- 
Jul 01 2007