2010-01-28 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / linq.cs
index a4b427e482b8231432c6052aff4b40383cab8c4d..2932b650646114ce1122a6e1431730b7a79cd1fa 100644 (file)
@@ -94,18 +94,18 @@ namespace Mono.CSharp.Linq
                                return rmg;
                        }
 
-                       public bool AmbiguousCall (ResolveContext ec, MethodBase ambiguous)
+                       public bool AmbiguousCall (ResolveContext ec, MethodSpec ambiguous)
                        {
-                               ec.Report.SymbolRelatedToPreviousError ((MethodInfo) mg);
-                               ec.Report.SymbolRelatedToPreviousError (ambiguous);
+                               ec.Report.SymbolRelatedToPreviousError (mg.BestCandidate.MetaInfo);
+                               ec.Report.SymbolRelatedToPreviousError (ambiguous.MetaInfo);
                                ec.Report.Error (1940, loc, "Ambiguous implementation of the query pattern `{0}' for source type `{1}'",
                                        mg.Name, mg.InstanceExpression.GetSignatureForError ());
                                return true;
                        }
 
-                       public bool NoExactMatch (ResolveContext ec, MethodBase method)
+                       public bool NoExactMatch (ResolveContext ec, MethodSpec method)
                        {
-                               AParametersCollection pd = TypeManager.GetParameterData (method);
+                               var pd = method.Parameters;
                                Type source_type = pd.ExtensionMethodType;
                                if (source_type != null) {
                                        Argument a = arguments [0];
@@ -125,7 +125,7 @@ namespace Mono.CSharp.Linq
                                        }
                                }
 
-                               if (!TypeManager.IsGenericMethod (method))
+                               if (!method.IsGenericMethod)
                                        return false;
 
                                if (mg.Name == "SelectMany") {