// Overload resulution works on virtual or non-virtual members only (no overrides). That
// means for base.member access we have to find the closest match after we found best candidate
//
- if ((method.Modifiers & (Modifiers.ABSTRACT | Modifiers.VIRTUAL | Modifiers.STATIC)) != Modifiers.STATIC) {
+ if ((method.Modifiers & (Modifiers.ABSTRACT | Modifiers.VIRTUAL | Modifiers.OVERRIDE)) != 0) {
//
// The method could already be what we are looking for
//
public virtual MemberExpr ResolveMemberAccess (ResolveContext ec, Expression left, SimpleName original)
{
- if (left != null && left.IsNull && TypeManager.IsReferenceType (left.Type)) {
+ if (left != null && left.IsNull && TypeSpec.IsReferenceType (left.Type)) {
ec.Report.Warning (1720, 1, left.Location,
"Expression will always cause a `{0}'", "System.NullReferenceException");
}
protected void EmitInstance (EmitContext ec, bool prepare_for_load)
{
TypeSpec instance_type = InstanceExpression.Type;
- if (TypeManager.IsValueType (instance_type)) {
+ if (TypeSpec.IsValueType (instance_type)) {
if (InstanceExpression is IMemoryLocation) {
- ((IMemoryLocation) InstanceExpression).AddressOf (ec, AddressOp.LoadStore);
+ ((IMemoryLocation) InstanceExpression).AddressOf (ec, AddressOp.Load);
} else {
LocalTemporary t = new LocalTemporary (instance_type);
InstanceExpression.Emit (ec);
InstanceExpression.Emit (ec);
// Only to make verifier happy
- if (instance_type.IsGenericParameter && !(InstanceExpression is This) && TypeManager.IsReferenceType (instance_type))
+ if (instance_type.IsGenericParameter && !(InstanceExpression is This) && TypeSpec.IsReferenceType (instance_type))
ec.Emit (OpCodes.Box, instance_type);
}
//
// With identical parameter lists
//
- if (!TypeSpecComparer.Equals (p_m.Parameters.Types,q_m.Parameters.Types))
+ if (!TypeSpecComparer.Equals (p_m.Parameters.Types, q_m.Parameters.Types))
return 0;
p = p_m.ReturnType;
public bool IsMarshalByRefAccess (ResolveContext rc)
{
// Checks possible ldflda of field access expression
- return !spec.IsStatic && TypeManager.IsValueType (spec.MemberType) && !(InstanceExpression is This) &&
+ return !spec.IsStatic && TypeSpec.IsValueType (spec.MemberType) && !(InstanceExpression is This) &&
rc.Module.PredefinedTypes.MarshalByRefObject.Define () &&
TypeSpec.IsBaseClass (spec.DeclaringType, rc.Module.PredefinedTypes.MarshalByRefObject.TypeSpec, false);
}