2004-10-14 Umadevi S <sumadevi@novell.com>
[mono.git] / mcs / gmcs / delegate.cs
index cd7e6cd27be988006151675119ae7c9f248234c9..617f4bc15610148790e2b615ab3890db215640bc 100644 (file)
@@ -473,10 +473,8 @@ namespace Mono.CSharp {
                //  Verifies whether the invocation arguments are compatible with the
                //  delegate's target method
                // </summary>
-               public static bool VerifyApplicability (EmitContext ec,
-                                                       Type delegate_type,
-                                                       ArrayList args,
-                                                       Location loc)
+               public static bool VerifyApplicability (EmitContext ec, Type delegate_type,
+                                                       ArrayList args, Location loc)
                {
                        int arg_count;
 
@@ -525,9 +523,13 @@ namespace Mono.CSharp {
 
                        bool ans = false;
                        if (arg_count == pd_count)
-                               ans = Invocation.VerifyArgumentsCompat (ec, args, arg_count, mb, false, delegate_type, loc);
+                               ans = Invocation.VerifyArgumentsCompat (
+                                       ec, args, arg_count, mb, false,
+                                       delegate_type, false, loc);
                        if (!ans && params_method)
-                               ans = Invocation.VerifyArgumentsCompat (ec, args, arg_count, mb, true,  delegate_type, loc);
+                               ans = Invocation.VerifyArgumentsCompat (
+                                       ec, args, arg_count, mb, true,
+                                       delegate_type, false, loc);
                        return ans;
                }
                
@@ -877,7 +879,7 @@ namespace Mono.CSharp {
                        Type e_type = e.Type;
 
                        if (!TypeManager.IsDelegateType (e_type)) {
-                               e.Error_UnexpectedKind ("method");
+                               e.Error_UnexpectedKind ("method", loc);
                                return null;
                        }