Thread overview
[Issue 495] New: ICE passing variadic arglist to another variadic template
Nov 12, 2006
d-bugmail
Nov 13, 2006
d-bugmail
Nov 15, 2006
d-bugmail
Dec 23, 2006
Thomas Kuehne
November 12, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=495

           Summary: ICE passing variadic arglist to another variadic
                    template
           Product: D
           Version: 0.173
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: wbaxter@gmail.com


// Calling variadic from variadic
import std.stdio: p=writefln;

void g(T...)()
{
    writefln("Howdy!");
}

void f(T...)(T t )
{
    g!(T)();
}


void main()
{
//Assertion failure: 'global.errors' on line 2752 in file 'template.c'
   f!(int)(3);
}


-- 

November 13, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=495





------- Comment #1 from wbaxter@gmail.com  2006-11-13 14:09 -------
Here's another little proggie that causes the same error, this is trying to be a global wrapper object for a signal:

import std.stdio : writefln;

import std.signals;
// junk needed by std signal that mixin can't grab for us:
import std.stdio;
import std.c.stdlib : calloc, realloc, free;
import std.outofmemory : _d_OutOfMemory;

class SigWrap(T...)
{
    mixin Signal!(T);
}

void main()
{
    SigWrap!(int) sig = new SigWrap!(int)();
}


-- 

November 15, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=495


deewiant@gmail.com changed:

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




------- Comment #2 from deewiant@gmail.com  2006-11-15 03:00 -------
Fixed in DMD 0.174.


-- 

December 23, 2006
d-bugmail@puremagic.com schrieb am 2006-11-12:
> http://d.puremagic.com/issues/show_bug.cgi?id=495

> // Calling variadic from variadic
> import std.stdio: p=writefln;
>
> void g(T...)()
> {
>     writefln("Howdy!");
> }
>
> void f(T...)(T t )
> {
>     g!(T)();
> }
>
>
> void main()
> {
> //Assertion failure: 'global.errors' on line 2752 in file 'template.c'
>    f!(int)(3);
> }

Added to DStress as http://dstress.kuehne.cn/compile/t/tuple_08_A.d http://dstress.kuehne.cn/run/t/tuple_08_B.d

Thomas