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 [EMAIL PROTECTED]

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

--- shadow/82639        2007-08-30 14:02:34.000000000 -0400
+++ shadow/82639.tmp.19789      2007-08-30 14:02:34.000000000 -0400
@@ -0,0 +1,54 @@
+Bug#: 82639
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [2.0] Type.GetMethod should raise AmbiguousMatchException
+
+Type.GetMethod incorrectly returns the first generic method
+instead of raising AmbiguousMatchException. Works (and it also happens
+to makes sense) on MS.NET 2.0.
+
+
+using System;
+using System.Reflection;
+
+class Test
+{
+       public void Method (int i)
+       {
+       }
+
+       public void Method <T> (int i)
+       {
+       }
+
+       public void Method <T, V> (int i)
+       {
+       }
+
+       static void Main ()
+       {
+               Type[] sig = new Type [] { typeof (int) };
+               BindingFlags flags = BindingFlags.Instance | 
BindingFlags.Public;
+
+               try {
+                       Console.WriteLine(typeof (Test).GetMethod ("Method", 
flags, null, sig,
+null));
+                       Console.WriteLine ("should not happen");
+               } catch (AmbiguousMatchException) {
+                       Console.WriteLine ("ok");
+               }
+       }
+}
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to