[Mono-bugs] [Bug 77367][Nor] New - Type.GetMethod called with Type.EmptyTypes matches any method

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jan 26 09:31:59 EST 2006


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 lluis at ximian.com.

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

--- shadow/77367	2006-01-26 09:31:58.000000000 -0500
+++ shadow/77367.tmp.14253	2006-01-26 09:31:59.000000000 -0500
@@ -0,0 +1,38 @@
+Bug#: 77367
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: lluis at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Type.GetMethod called with Type.EmptyTypes matches any method
+
+Try the following test case:
+
+using System;
+using System.Reflection;
+
+public class Test
+{
+	public static void Main ()
+	{
+		MethodInfo i = typeof(Test).GetMethod ("Run", Type.EmptyTypes);
+		Console.WriteLine (i);
+	}
+	
+	public void Run (bool b)
+	{
+	}
+}
+
+The call to GetMethod() returns the "Run" method, but it should not, it
+should only match a method without parameters.


More information about the mono-bugs mailing list