[Mono-bugs] [Bug 48015][Wis] New - Hashtable fails with keys derived from ContextBoundObject
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 28 Aug 2003 21:51:43 -0400 (EDT)
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 vladimir@pobox.com.
http://bugzilla.ximian.com/show_bug.cgi?id=48015
--- shadow/48015 2003-08-28 21:51:43.000000000 -0400
+++ shadow/48015.tmp.16210 2003-08-28 21:51:43.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 48015
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vladimir@pobox.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Hashtable fails with keys derived from ContextBoundObject
+
+The following code:
+
+---- bug10.cs ----
+using System;
+using System.Collections;
+
+public class Bar : System.ContextBoundObject {
+}
+
+public class Driver {
+ public static void Main (string[] args) {
+ Hashtable ht;
+ Bar b = new Bar();
+ ht = new Hashtable();
+ ht.Add (b, 100);
+ if (ht.ContainsKey (b)) {
+ Console.WriteLine("pass");
+ } else {
+ Console.WriteLine("fail");
+ }
+ }
+}
+---- end ----
+
+prints "fail" under mcs/mono CVS as of today (post 0.26), and prints "pass"
+under the MS runtime. Haven't looked deeper to see specifically what the
+problem is; if Bar derives from MarshalByRefObject or anything else, it
+works fine.