compiler assertion failure w/ templates

Dan ddaglas at gmail.com
Sun Dec 17 06:07:10 PST 2006


The following code:

static int _i=0;

template NEXT(int idx) {
  const NEXT = idx;
}

interface Protocol {
  static ubyte HELO = NEXT!(_i++);
}

void main() { }

causes the Win32 dmd compiler to error with the following:

C:\>dmd z.d
global.errors = 0, gag = 0
00936D54 ++ type=int e1=00962524 e2=00936D78
  00962524 var var=_i type=int
  00936D78 1 type=int
Assertion failure: '0' on line 775 in file 'expression.c'

abnormal program termination

--- errorlevel 1

--Dan

P.S. Is Bugzilla still down?  If not, how do I post bugs formally and/or
review if they're already reported?


More information about the Digitalmars-d-bugs mailing list