Hi Andreas,
I have a quick question about polymorphic types.
I'm trying to register a series of functions that accepts a const reference to an abstract class and I'd love to find a way to make it work like in c++, being able to implicitly cast a Derived class to a const reference of the base class. Something like this :
My objects are registered as Values making it difficult I guess to find a solution to my problem. The first issue of course is that the Base class usually doesn't have a public default constructor, which trigger an error message when trying to register the type. I managed to make it run by registering the base type as POD (this is probably totally wrong). Secondly I added to the Derived classes an opImplConv operator. Everything compiles fine without any error messages, but somehow when converted and then passed to the function the object seems to be empty and usually make the application crash.
I don't know if I've been really clear but if you have any advices other than re-implementing everything as Ref types I'd be really grateful.
Thanks in advance,
Simon.