[Issue 14363] DMD should compile SDC test0165.d

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Mar 28 22:04:43 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14363

--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Shammah Chancellor from comment #2)
> Your code has a bug?
> 
> return new B(5);
> 
> Should be:
> 
> return new B();

Yes. Sorry.

> With that, your example compiles and works just fine on SDC.

Hmm, interesting. SDC might use a thunk to get valid context pointer for base
classes from the instantiated context.
But it would need some runtime cost and additional vtbl entry. I don't have any
knowledge about the SDC backend, but the ABI around nested classes would be
different from dmd's.

--


More information about the Digitalmars-d-bugs mailing list