* mcs/flowanalysis.cs (UsageVector.IsDirty): Remove.
[mono.git] / mcs / gmcs / delegate.cs
index 32c781f4d29b0afc10bf5f86e7bc0e5072fd324b..dd10369b7ec0644d1dff1d0e43840165e942a79d 100644 (file)
@@ -485,7 +485,7 @@ namespace Mono.CSharp {
                ///  Verifies whether the delegate in question is compatible with this one in
                ///  order to determine if instantiation from the same is possible.
                /// </summary>
-               public static bool VerifyDelegate (EmitContext ec, Type delegate_type, Type probe_type, Location loc)
+               public static bool VerifyDelegate (EmitContext ec, Type delegate_type, Location loc)
                {
                        Expression ml = Expression.MemberLookup (
                                ec.ContainerType, delegate_type, "Invoke", loc);
@@ -808,21 +808,19 @@ namespace Mono.CSharp {
 
                        Argument a = (Argument) Arguments [0];
                        
-                       if (!a.ResolveMethodGroup (ec, loc))
+                       if (!a.ResolveMethodGroup (ec))
                                return null;
                        
                        Expression e = a.Expr;
 
                        if (e is AnonymousMethod && RootContext.Version != LanguageVersion.ISO_1)
-                               return ((AnonymousMethod) e).Compatible (ec, type, false);
+                               return ((AnonymousMethod) e).Compatible (ec, type);
 
                        MethodGroupExpr mg = e as MethodGroupExpr;
                        if (mg != null)
                                return ResolveMethodGroupExpr (ec, mg);
 
-                       Type e_type = e.Type;
-
-                       if (!TypeManager.IsDelegateType (e_type)) {
+                       if (!TypeManager.IsDelegateType (e.Type)) {
                                Report.Error (149, loc, "Method name expected");
                                return null;
                        }
@@ -838,8 +836,8 @@ namespace Mono.CSharp {
 
                        // This is what MS' compiler reports. We could always choose
                        // to be more verbose and actually give delegate-level specifics
-                       if (!Delegate.VerifyDelegate (ec, type, e_type, loc)) {
-                               Report.Error (29, loc, "Cannot implicitly convert type '" + e_type + "' " +
+                       if (!Delegate.VerifyDelegate (ec, type, loc)) {
+                               Report.Error (29, loc, "Cannot implicitly convert type '" + e.Type + "' " +
                                              "to type '" + type + "'");
                                return null;
                        }