typeid() broken for interfaces?
Jacob Carlborg
doob at me.com
Mon Dec 3 07:51:34 PST 2012
On 2012-12-03 15:41, Maxim Fomin wrote:
> Object does not implement interface I, so why should interface instance
> be implicitly converted to it? It even should not be implicitly
> convertible to class if that class implements interface. However it is
> possible to use cast.
Because Object is the root of the class hierarchy. That's how it works
in Java, for example. It's just because of these COM interfaces, that
are not D interfaces, that we have this behavior.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list