Bug 1239 – ICE when empty tuple is passed to variadic template function

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-05-17T09:07:00Z
Last change time
2014-02-16T15:26:20Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
manuelk89

Comments

Comment #0 by manuelk89 — 2007-05-17T09:07:38Z
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)
Comment #1 by bugzilla — 2007-07-01T14:07:13Z
Fixed DMD 1.018 and DMD 2.002