Hi, I have modified CScriptAny a little and by overloading opCast and opImplConv I won't need .Retrieve method.
Everything is fine, objects and primitive types are retrieved successfully but when I try to assign a handle implicitly it fails completely.
Example:
obj@ myObject;
@myObject = myAny; // myAny is a valid any object
I tracked more and I found out that ref pointer (1st parameter) is NULL and typeID (2nd parameter) is set to that object type id ((typeID & asTYPEID_MASK_OBJECT) == true) and in typeID, asTYPEID_OBJHANDLE flag is not set! (However, this problem does not occur by using .Retrieve method or any method instead of implicitly assigning)
Also, I feel that opConv operator overloading fails, e.g. I want to have something like this: int(myAny); and it gives errors while compiling.
And by the way, what is opImplCast when opImplConv exists? When I try to register opImplCast I'm not able to assign my 'any' object (e.g. any myAny = 50;) (I have overloaded opAssign too, so no more .Store method)