protected override Expression DoResolve (ResolveContext ec)
{
TypeSpec del_type = InstanceExpr.Type;
if (del_type == null)
return null;
//
// Do only core overload resolution the rest of the checks has been
// done on primary expression
//
method = Delegate.GetInvokeMethod (ec.Compiler, del_type);
var res = new OverloadResolver (new MemberSpec[] { method }, OverloadResolver.Restrictions.DelegateInvoke, loc);
var valid = res.ResolveMember<MethodSpec> (ec, ref arguments);
if (valid == null && !res.BestCandidateIsDynamic)
return null;
type = method.ReturnType;
eclass = ExprClass.Value;
return this;
}