Author: atsushi
Date: 2005-04-17 07:15:45 -0400 (Sun, 17 Apr 2005)
New Revision: 43143

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/doc.cs
Log:
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.



Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2005-04-17 10:59:30 UTC (rev 43142)
+++ trunk/mcs/mcs/ChangeLog     2005-04-17 11:15:45 UTC (rev 43143)
@@ -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/mcs/doc.cs
===================================================================
--- trunk/mcs/mcs/doc.cs        2005-04-17 10:59:30 UTC (rev 43142)
+++ trunk/mcs/mcs/doc.cs        2005-04-17 11:15:45 UTC (rev 43143)
@@ -353,7 +353,7 @@
                                MethodSignature.method_signature_filter,
                                msig);
                        if (mis.Length > 0) {
-                               if (mis.Length > 1)
+                               if (IsAmbiguous (mis))
                                        warningType = 419;
                                return mis [0];
                        }
@@ -367,7 +367,7 @@
                                        memberName);
                                if (mis.Length == 0)
                                        return null;
-                               if (mis.Length > 1)
+                               if (IsAmbiguous (mis))
                                        warningType = 419;
                                return mis [0];
                        }
@@ -475,6 +475,19 @@
                        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];
 
                //

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

Reply via email to