https://issues.dlang.org/show_bug.cgi?id=21690
kinke <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from kinke <[email protected]> --- The C++ vtable emitted by D does not contain any pointer to any typeinfo AFAIK. Of course we don't generate the C++ typeinfo anyway, but we do generate the D one (for use with the D GC). At least some C++ implementations store the (C++) typeinfo pointer at vtbl index -1. But then again, when we are confronted with some C++ class ref, we have no idea whether it was instantiated on the D side or C++ side and so which vtable its vptr points to. So while getting proper dynamic casts working is probably quite hard, we could probably disallow downcasts like this and require an explicit static cast (`cast(CC) cast(void*) ca`)? --
