[Mono-bugs] [Bug 28582][Min] New - Ambiguity in GetProperty when multiple indexers exist.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
5 Aug 2002 16:45:27 -0000


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by tim@timcoleman.com.

http://bugzilla.ximian.com/show_bug.cgi?id=28582

--- shadow/28582	Mon Aug  5 12:45:27 2002
+++ shadow/28582.tmp.4074	Mon Aug  5 12:45:27 2002
@@ -0,0 +1,62 @@
+Bug#: 28582
+Product: Mono/Runtime
+Version: unspecified
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: tim@timcoleman.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Ambiguity in GetProperty when multiple indexers exist.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+When I try to run GetProperty to retrieve the indexer property for a given
+Type, if there is more than one indexer, an ambiguity arises, even if the
+argument types are specified in the call to GetProperty.
+
+Steps to reproduce the problem:
+1. Run the sample code provided.
+
+Actual Results:
+** (process:18507): WARNING **: unhandled exception
+System.Reflection.AmbiguousMatchException: "Ambiguous matching in method
+resolution"
+in <0x001dc> 00 System.MonoType:GetPropertyImpl
+(string,System.Reflection.BindingFlags,System.Reflection.Binder,System.Type,System.Type[],System.Reflection.ParameterModifier[])
+in <0x000a3> 00 System.Type:GetProperty
+(string,System.Reflection.BindingFlags,System.Reflection.Binder,System.Type,System.Type[],System.Reflection.ParameterModifier[])
+in <0x0009b> 00 .Junk:Main ()
+
+Expected Results:
+Not an error.
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+
+Sample code:
+
+using System;
+using System.Reflection;
+
+public class Junk {
+        public static void Main ()
+        {
+                BindingFlags flags = BindingFlags.Public |
+BindingFlags.Instance;
+                Type type = typeof
+(System.Web.Services.Description.ServiceCollection);
+                PropertyInfo itemProp = type.GetProperty ("Item", flags,
+null, null, new Type [1] {typeof (int)}, null);
+        }
+}