Hi,
in the Urho3D engine we saw the following assert trigger when in script, the return value of a void function was mistakenly attempted to be cast into an object handle:
asASSERT(ctx->type.dataType.IsReference());
in as_compiler.cpp, function asCCompiler::ConvertToVariable(asSExprContext *ctx), around line 10974.
To fix, I added the following check for void to asCCompiler::CompileConversion(asCScriptNode *node, asSExprContext *ctx) around line 8150:
bool conversionOK = false;
if( !expr.type.isConstant && expr.type.dataType.GetTokenType() != ttVoid )
which may not be the best way to fix, but seemed to work.