[Mono-bugs] [Bug 75366][Maj] Changed - SRE uses Reflected not Declaring type for token

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 1 13:51:20 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 bmaurer at users.sf.net.

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

--- shadow/75366	2005-07-01 13:33:35.000000000 -0400
+++ shadow/75366.tmp.20322	2005-07-01 13:51:20.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 75366
 Product: Mono: Runtime
 Version: 1.1
 OS: unknown
 OS Details: mono svn 23.06.2005
-Status: RESOLVED   
-Resolution: WONTFIX
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Major
 Component: misc
 AssignedTo: lupus at ximian.com                            
 ReportedBy: nazgul at omega.pl               
 QAContact: mono-bugs at ximian.com
@@ -212,6 +212,36 @@
 `A<int>'.
 
 ------- Additional Comments From martin at ximian.com  2005-07-01 13:33 -------
 One thing we could possibly do is modify `DeclaringType' to return a
 generic instance, too.  Nobody seems to be using `DeclaringType', so
 changing its behavior is probably ok.
+
+------- Additional Comments From bmaurer at users.sf.net  2005-07-01 13:51 -------
+using System;
+using System.Reflection;
+
+class Foo <T>
+{
+   public T foo;
+}
+
+class X
+{
+   static void Main ()
+   {
+	   foreach (FieldInfo fi in typeof (Foo<int>).GetFields ()) {
+		   Console.WriteLine (fi);
+		   Console.WriteLine (fi.ReflectedType);
+		   Console.WriteLine (fi.DeclaringType);
+		   
+	   }
+	   
+  }
+}
+
+[benm at omega ~]$ mono x.exe
+System.Int32 foo
+Foo`1[System.Int32]
+Foo`1[System.Int32]
+
+I don't think this is a wontfix. The use of reflection is correct.


More information about the mono-bugs mailing list