Author: atsushi
Date: 2007-07-19 05:33:53 -0400 (Thu, 19 Jul 2007)
New Revision: 82268

Modified:
   trunk/mcs/class/corlib/System.Reflection/ChangeLog
   trunk/mcs/class/corlib/System.Reflection/MonoMethod.cs
   trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
   trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
Log:
2007-07-19  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * MonoMethod.cs : ToString() did not show correct return type when
          it is generic.

        * MethodInfoTest.cs : added ToString() test for generic return type.



Modified: trunk/mcs/class/corlib/System.Reflection/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection/ChangeLog  2007-07-19 07:36:16 UTC 
(rev 82267)
+++ trunk/mcs/class/corlib/System.Reflection/ChangeLog  2007-07-19 09:33:53 UTC 
(rev 82268)
@@ -1,3 +1,8 @@
+2007-07-19  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * MonoMethod.cs : ToString() did not show correct return type when
+         it is generic.
+
 2007-07-15  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * FieldInfo.cs: Implement GetOptional/RequiredCustomModifiers ().

Modified: trunk/mcs/class/corlib/System.Reflection/MonoMethod.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection/MonoMethod.cs      2007-07-19 
07:36:16 UTC (rev 82267)
+++ trunk/mcs/class/corlib/System.Reflection/MonoMethod.cs      2007-07-19 
09:33:53 UTC (rev 82268)
@@ -240,11 +240,10 @@
 
                public override string ToString () {
                        StringBuilder sb = new StringBuilder ();
-                       if (ReturnType.IsClass && ReturnType.Namespace != 
String.Empty) {
-                               sb.Append (ReturnType.Namespace);
-                               sb.Append (".");
-                       }
-                       sb.Append (ReturnType.Name);
+                       if (ReturnType.IsClass)
+                               sb.Append (ReturnType.ToString ());
+                       else
+                               sb.Append (ReturnType.Name);
                        sb.Append (" ");
                        sb.Append (Name);
 #if NET_2_0 || BOOTSTRAP_NET_2_0

Modified: trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog     2007-07-19 
07:36:16 UTC (rev 82267)
+++ trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog     2007-07-19 
09:33:53 UTC (rev 82268)
@@ -1,3 +1,7 @@
+2007-07-19  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * MethodInfoTest.cs : added ToString() test for generic return type.
+
 2007-07-09  Mark Probst  <[EMAIL PROTECTED]>
 
        * AssemblyTest.cs: Enabled test for bug 78465.

Modified: trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs     
2007-07-19 07:36:16 UTC (rev 82267)
+++ trunk/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs     
2007-07-19 09:33:53 UTC (rev 82268)
@@ -193,6 +193,15 @@
                                this.GetType ().GetMethod ("HeyHey").ToString 
());
                }
 
+#if NET_2_0
+               [Test]
+               public void ToStringGenericMethod ()
+               {
+                       Assert.AreEqual 
("System.Collections.ObjectModel.ReadOnlyCollection`1[T] AsReadOnly[T](.T[])",
+                               typeof (Array).GetMethod 
("AsReadOnly").ToString ());
+               }
+#endif
+
                class GBD_A         { public virtual     void f () {} }
                class GBD_B : GBD_A { public override    void f () {} }
                class GBD_C : GBD_B { public override    void f () {} }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to