GenericMethod generic_method;
MemberName member_name;
+ TypeArguments targs = null;
if (method.IsGeneric) {
//
// Copy all base generic method type parameters info
//
var hoisted_tparams = method.GenericDefinition.TypeParameters;
- var targs = new TypeArguments ();
var type_params = new TypeParameter[hoisted_tparams.Length];
+ targs = new TypeArguments ();
+ targs.Arguments = new TypeSpec[type_params.Length];
for (int i = 0; i < type_params.Length; ++i) {
var tp = hoisted_tparams[i];
targs.Add (new TypeParameterName (tp.Name, null, Location));
+ targs.Arguments[i] = tp;
type_params[i] = new TypeParameter (tp, this, null, new MemberName (tp.Name), null);
}
var mg = MethodGroupExpr.CreatePredefined (method, method.DeclaringType, Location);
mg.InstanceExpression = new BaseThis (method.DeclaringType, Location);
+ if (targs != null)
+ mg.SetTypeArguments (rc, targs);
// Get all the method parameters and pass them as arguments
var real_base_call = new Invocation (mg, block.GetAllParametersArguments ());
// 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
//