protected override TargetFunctionType DoEvaluateMethod(ScriptingContext context,
LocationType type,
Expression[] types)
{
if (type != LocationType.Method)
return null;
if (types == null) {
if (methods.Length == 1)
return (TargetFunctionType) methods [0];
throw new ScriptingException (
"Ambiguous method `{0}'; need to use full name", Name);
}
TargetType[] argtypes = new TargetType [types.Length];
for (int i = 0; i < types.Length; i++)
argtypes [i] = types [i].EvaluateType (context);
TargetFunctionType func = OverloadResolve (context, argtypes);
if (func != null)
return func;
return context.Interpreter.QueryMethod (methods);
}