- for (int i = arg_count; i > 0;) {\r
- i--;\r
- Expression conv;\r
- Argument a = (Argument) args [i];\r
- Expression a_expr = a.Expr;\r
- \r
- if (pd.ParameterType (i) != a_expr.Type) {\r
- \r
- conv = Expression.ConvertImplicitStandard (ec, a_expr, pd.ParameterType (i), loc);\r
-\r
- if (conv == null) {\r
- Report.Error (1594, loc,\r
- "Delegate '" + delegate_type.ToString () +\r
- "' has some invalid arguments.");\r
-\r
- Report.Error (1503, loc,\r
- "Argument " + (i+1) +\r
- ": Cannot convert from '" +\r
- TypeManager.CSharpName (a_expr.Type)\r
- + "' to '" + TypeManager.CSharpName (pd.ParameterType (i)) + "'");\r
- return false;\r
- }\r
-\r
- if (a_expr != conv)\r
- a.Expr = conv;\r
- }\r
- }\r
-\r
- return true;\r
+ return Invocation.VerifyArgumentsCompat (ec, args, arg_count, mb, !not_params_method,\r
+ delegate_type, loc);\r