Internal error from DMD

Bradley Smith digitalmars-com at baysmith.com
Fri Jun 23 17:04:32 PDT 2006


Is this a bug? Should the DMD compiler ever give an internal error?

import std.stdio;
import std.boxer;

void main() {
	Object[] l;
	l ~= cast(Object) box(1);
	int a = unbox!(int)(cast(Box) l[0]);
	writefln("value %d", a);
}

 >dmd tmp.d c:\dmd\src\phobos\std\boxer.d
tmp.d(6): e2ir: cannot cast from Box to object.Object
tmp.d(7): e2ir: cannot cast from object.Object to Box
Internal error: e2ir.c 267


Thanks,
   Bradley



More information about the Digitalmars-d-learn mailing list