protected override Expression DoResolve(ResolveContext ec)
{
eclass = ExprClass.PropertyAccess;
bool must_do_cs1540_check = false;
ec.Report.DisableReporting ();
bool res = ResolveGetter (ec, ref must_do_cs1540_check);
ec.Report.EnableReporting ();
if (!res) {
if (InstanceExpression != null) {
TypeSpec expr_type = InstanceExpression.Type;
ExtensionMethodGroupExpr ex_method_lookup = ec.LookupExtensionMethod (expr_type, Name, 0, loc);
if (ex_method_lookup != null) {
ex_method_lookup.ExtensionExpression = InstanceExpression;
ex_method_lookup.SetTypeArguments (ec, targs);
return ex_method_lookup.Resolve (ec);
}
}
ResolveGetter (ec, ref must_do_cs1540_check);
return null;
}
if (!InstanceResolve (ec, false, must_do_cs1540_check))
return null;
//
// Only base will allow this invocation to happen.
//
if (IsBase && spec.IsAbstract) {
Error_CannotCallAbstractBase (ec, TypeManager.GetFullNameSignature (spec));
}
if (spec.MemberType.IsPointer && !ec.IsUnsafe){
UnsafeError (ec, loc);
}
if (!ec.IsObsolete) {
ObsoleteAttribute oa = spec.GetAttributeObsolete ();
if (oa != null)
AttributeTester.Report_ObsoleteMessage (oa, GetSignatureForError (), loc, ec.Report);
}
return this;
}