On Fri, 10 Sep 2010 13:55:37 -0400, Andrej Mitrovic <[email protected]> wrote:

Is this D1 code? Because in D2:

S2* c = new S1(); //  Error: cannot implicitly convert expression (new
S1) of type S1* to S2*

S2* d = cast(S2*) GC.malloc(S2.sizeof);
d = S2();  // Error: cannot implicitly convert expression (S2(0)) of
type S2 to S2*

Neither of those work.

I think it was a typo.  He meant

S1* c = new S1()

BTW, I filed a bug report on this a while back:

http://d.puremagic.com/issues/show_bug.cgi?id=4247

-Steve

Reply via email to