Like getClass()

Sergey Gromov snake.scaly at gmail.com
Thu Oct 2 18:44:11 PDT 2008


Mon, 29 Sep 2008 03:02:58 +0400,
Sergey Gromov wrote:
> Mon, 29 Sep 2008 01:12:45 +0400,
> Denis Koroskin wrote:
> > On Sun, 28 Sep 2008 04:42:15 +0400, Sergey Gromov <snake.scaly at gmail.com>  
> > wrote:
> > 
> > > Sat, 27 Sep 2008 19:21:56 -0400,
> > > Christopher Wright wrote:
> > >> Since .classinfo is essentially a virtual call, and interface vtbls are
> > >> filled from the class's vtbl, it shouldn't in theory be terribly
> > >> difficult to change this. Of course, I'd have to check the dmd source to
> > >> be sure.
> > >
> > > I'd say it's a bug.  Classinfo is for runtime class, and runtime class
> > > can never be an interface.
> > 
> > Do all IUknown interface instances have classinfo member? That's not a bug  
> > if they don't. That's the same reason why interfaces can't be casted to  
> > Object.
> 
> IUnknown cannot be a D interface because it does not comply with D ABI.  

My apologies.  I didn't know that IUnknown were directly supported by a 
compiler as a special case of a super-interface.  Everything you say 
seems to be relevant now.


More information about the Digitalmars-d-learn mailing list