[Mono-bugs] [Bug 54945][Cri] Changed - Declaring type set incorrectly for properties in a base class

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 9 Mar 2004 19:26:32 -0500 (EST)


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@users.sf.net.

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

--- shadow/54945	2004-03-09 18:26:09.000000000 -0500
+++ shadow/54945.tmp.10532	2004-03-09 19:26:32.000000000 -0500
@@ -1,22 +1,22 @@
 Bug#: 54945
 Product: Mono: Runtime
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: RESOLVED   
-Resolution: NOTABUG
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Critical
 Component: misc
 AssignedTo: martin@ximian.com                            
 ReportedBy: lluis@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
-Summary: GetCustomAttributes failing for fields defined in a base class
+Summary: Declaring type set incorrectly for properties in a base class
 
 GetCustomAttributes is not returning the correct result for fields defined
 in a base class, but only if they are got using Type.GetFields. 
 
 This is a test case. Notice that the first Console.WriteLine prints the
 correct value, but when getting the field with GetFields, it does not.
@@ -108,6 +108,35 @@
 ------- Additional Comments From bmaurer@users.sf.net  2004-03-09 10:13 -------
 Martin, I think that you said that this was in your area when I was 
 talking with you at the airport.
 
 ------- Additional Comments From martin@ximian.com  2004-03-09 18:26 -------
 Dude, you just wasted 20 minutes of my time - look at your testcase, dude ! 
+
+------- Additional Comments From bmaurer@users.sf.net  2004-03-09 19:26 -------
+Ok, so this was actually a bug, martin fixed it in cvs. However, it is
+not fixed for the property case:
+
+using System;
+using System.Reflection;
+
+class Test
+{
+	public static void Main ()
+	{
+		foreach (MemberInfo mi in typeof (Derived).GetMembers
+(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance
+| BindingFlags.Static)) {
+			if (mi.ReflectedType != typeof (Derived))
+				Console.WriteLine (mi);
+		}
+	}
+}
+
+public class Base
+{
+	public string property { set {} }
+}
+
+public class Derived: Base
+{
+}