std.boxer problem

Alexander Panek alexander.panek at brainsware.org
Sat Apr 29 03:34:24 PDT 2006


Tydr Schnubbis wrote:
> Why can't I cast from Object to Box?  That seems to defeat the purpose 
> of boxing.  I get this error:
> 
> serverlist.d(185): e2ir: cannot cast from object.Object to Box
> Internal error: e2ir.c 267

Object o = new Object();
Box b = box(o);

foo bar = unbox!(foo)(b);

Regards,
Alexander Panek



More information about the Digitalmars-d mailing list