On 7/7/2016 5:43 AM, Jacob Carlborg wrote:
On 07 Jul 2016, at 12:23, Walter Bright via dmd-internals <[email protected]> wrote: C++ classes have no dynamic type info (i.e. what the most derived class is). But they do have static type info.What I mean is this: // first example, unrelated to the DMD codebase extern(C++) class Foo {} void main () { auto a = new Foo; assert(a.classinfo is null); } // second example, somewhere inside the DMD codebase auto a = new IntegerExp(0); assert(a.classinfo !is null); Both of the above assertions pass. My question is why the second assertion pass.
I don't know. I suspect there is more to it than the snippet here. _______________________________________________ dmd-internals mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-internals
