www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 495] New: ICE passing variadic arglist to another variadic template

reply d-bugmail puremagic.com writes:
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);
}


-- 
Nov 11 2006
next sibling parent d-bugmail puremagic.com writes:
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)();
}


-- 
Nov 13 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
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.


-- 
Nov 15 2006
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 -----BEGIN PGP SIGNATURE----- iD8DBQFFjZHjLK5blCcjpWoRAr4/AJ9DHwFOttpZ09xn2Wq907voQ/fQOQCgjcgK yPQnPMcSr6kdGQBjiLPP32I= =jOS9 -----END PGP SIGNATURE-----
Dec 23 2006