On 2015-08-26 20:59, Adam D. Ruppe wrote:

Yes, exactly. COM and C++ things won't necessarily have a D TypeInfo
available and since interfaces can be them, it can't be sure.

What I do there is to just cast the interface to Object. Then you should
check for null to cover those cases, then you can typeid or classinfo it.

Is it possible to detect at compile time if an interface is not a native D interface?

Now when I think about it, we actually have four (!) different kinds of interfaces. Native D, C++, Objective-C and COM.

--
/Jacob Carlborg

Reply via email to