[Mono-bugs] [Bug 76277][Min] New - Type.ToString() of a generic parameter returns T[T] instead of T

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Sep 29 12:10:51 EDT 2005


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

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

--- shadow/76277	2005-09-29 12:10:50.000000000 -0400
+++ shadow/76277.tmp.15141	2005-09-29 12:10:51.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 76277
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Type.ToString() of a generic parameter returns T[T] instead of T
+
+The example code below prints "T[T]" instead of "T".
+
+using System;
+using System.Reflection;
+
+class Test
+{
+        public static void Main ()
+        {
+                Console.WriteLine (typeof (Test).GetMethod ("Foo").ReturnType);
+        }
+
+        public T Foo<T> ()
+        {
+                return default (T);
+        }
+}
+
+Actual Results:
+$ mono ./gentypename.exe
+T[T]
+
+Expected Results:
+$ ./gentypename.exe
+T
+
+How often does this happen? 
+consistently.
+
+Additional Information:
+either corlib or runtime bug.


More information about the mono-bugs mailing list