Bug 495 – ICE passing variadic arglist to another variadic template

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2006-11-12T00:17:00Z
Last change time
2014-02-15T13:19:58Z
Assigned to
bugzilla
Creator
wbaxter

Comments

Comment #0 by wbaxter — 2006-11-12T00:17:14Z
// 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); }
Comment #1 by wbaxter — 2006-11-13T14:09:19Z
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)(); }
Comment #2 by matti.niemenmaa+dbugzilla — 2006-11-15T03:00:30Z
Fixed in DMD 0.174.
Comment #3 by thomas-dloop — 2006-12-23T15:26:02Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] 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-----