[Mono-bugs] [Bug 77466][Nor] New - [GMCS] MethodInfo.IsGenericMethodDefinition returns true for inflated methods

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Feb 3 17:36:16 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 vargaz at gmail.com.

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

--- shadow/77466	2006-02-03 17:36:16.000000000 -0500
+++ shadow/77466.tmp.20065	2006-02-03 17:36:16.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 77466
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: vargaz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] MethodInfo.IsGenericMethodDefinition returns true for inflated methods
+
+Testcase:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Reflection;
+using System.Collections.Generic;
+
+public class Tests
+{
+	public static void foo<T> () {
+	}
+
+	public static void Main () {
+		MethodInfo mi = typeof (Tests).GetMethod ("foo");
+		Console.WriteLine (mi.IsGenericMethod);
+		Console.WriteLine (mi.IsGenericMethodDefinition);
+		MethodInfo mi2 = mi.MakeGenericMethod (new Type[] { typeof (int) });
+		Console.WriteLine (mi2.IsGenericMethod);
+		Console.WriteLine (mi2.IsGenericMethodDefinition);
+	}
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+Under MS.NET, this prints:
+True
+True
+True
+False
+
+Under mono, it prints:
+True
+True
+True
+True


More information about the mono-bugs mailing list