Author: martin
Date: 2005-04-20 04:55:29 -0400 (Wed, 20 Apr 2005)
New Revision: 43322

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/doc.cs
Log:
**** Merged r43143 from MCS ****


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2005-04-20 08:55:07 UTC (rev 43321)
+++ trunk/mcs/gmcs/ChangeLog    2005-04-20 08:55:29 UTC (rev 43322)
@@ -1,3 +1,9 @@
+2005-04-17  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * doc.cs : In some cases FilterName returns MonoEvent and MonoField
+         for the same event member, so exclude such cases from warning 419.
+         Fixed bug #74633.
+
 2005-04-16  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * expression.cs (Binary.ResolveOperator): Apply patch from John

Modified: trunk/mcs/gmcs/doc.cs
===================================================================
--- trunk/mcs/gmcs/doc.cs       2005-04-20 08:55:07 UTC (rev 43321)
+++ trunk/mcs/gmcs/doc.cs       2005-04-20 08:55:29 UTC (rev 43322)
@@ -351,7 +351,7 @@
                                MethodSignature.method_signature_filter,
                                msig);
                        if (mis.Length > 0) {
-                               if (mis.Length > 1)
+                               if (IsAmbiguous (mis))
                                        warningType = 419;
                                return mis [0];
                        }
@@ -365,7 +365,7 @@
                                        memberName);
                                if (mis.Length == 0)
                                        return null;
-                               if (mis.Length > 1)
+                               if (IsAmbiguous (mis))
                                        warningType = 419;
                                return mis [0];
                        }
@@ -473,6 +473,21 @@
                        return mis [0];
                }
 
+               private static bool IsAmbiguous (MemberInfo [] members)
+               {
+                       if (members.Length < 2)
+                               return false;
+                       if (members.Length > 2)
+                               return true;
+                       if (members [0] is EventInfo && members [1] is 
FieldInfo)
+                               return false;
+                       if (members [1] is EventInfo && members [0] is 
FieldInfo)
+                               return false;
+                       return true;
+               }
+
+               private static Type [] emptyParamList = new Type [0];
+
                //
                // Processes "see" or "seealso" elements.
                // Checks cref attribute.

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to