Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Disabled "UseUnset" warning for base invocations in class methods.

  • Loading branch information...
commit fc667b56e4ba461b353a0e4e5817d015d6030f98 1 parent c19397d
@Lexikos Lexikos authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 source/script_object.cpp
View
5 source/script_object.cpp
@@ -1549,7 +1549,10 @@ ResultType STDMETHODCALLTYPE MetaObject::Invoke(ExprTokenType &aResultToken, Exp
this_token.var = this_var;
if (IObject *this_class_base = this_class->Base())
{
- return this_class_base->Invoke(aResultToken, this_token, (aFlags & ~IF_METAFUNC) | IF_METAOBJ, aParam, aParamCount);
+ ResultType result = this_class_base->Invoke(aResultToken, this_token, (aFlags & ~IF_METAFUNC) | IF_METAOBJ, aParam, aParamCount);
+ // Avoid returning INVOKE_NOT_HANDLED in this case so that our caller never
+ // shows an "uninitialized var" warning for base.Foo() in a class method.
+ return result == INVOKE_NOT_HANDLED ? OK : result;
}
return OK;
}
Please sign in to comment.
Something went wrong with that request. Please try again.