Quote:Original post by abrken
I don't know what you're meaning when your saying *safely*
I meant situation like this:
Say, I have two (C++) classes, CChild and CParent, CChild : public CParent, which are exported to Angel Script (as unrelated types, alas).
Suppose I have an instance of CChild (in AngelScript) and I want to call a function which takes CParent &. How do I cast CChild to CParent?
To illustrate this:
void SomeFunc( CParent & p );...CChild c;SomeFunc( c ); // fails to compile - unrelated typesSomeFunc( (CParent &) c ); // fails to compile - expected expression value
Right now it seems like no such typecast is possible in AngelScript.