[Mono-bugs] [Bug 55874][Wis] New - Type.GetProperties dups if you override set only.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 21 Mar 2004 12:17:53 -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=55874

--- shadow/55874	2004-03-21 12:17:53.000000000 -0500
+++ shadow/55874.tmp.28547	2004-03-21 12:17:53.000000000 -0500
@@ -0,0 +1,56 @@
+Bug#: 55874
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: bmaurer@users.sf.net                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Type.GetProperties dups if you override set only.
+
+The following code:
+
+using System;
+using System.Reflection;
+
+class A {
+	public virtual int Foo {
+		get { return 1; }
+		set { }
+	}
+}
+
+class B : A {
+	public override int Foo {
+		set {  }
+	}
+}
+
+class T {
+	static void Main ()
+	{
+		foreach (PropertyInfo pi in typeof (B).GetProperties ())
+			Console.WriteLine (pi);
+	}
+}
+
+prints 
+
+System.Int32 Foo
+System.Int32 Foo
+on mono, but prints only one line on MS.net.
+
+The issue is that we check for override properties by putting one of the
+methods in a hashtable, which is incorrect.
+
+I am going to tackle this bug.
+
+Lupus, thanks again for catching this.