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 [EMAIL PROTECTED]

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

--- shadow/76750        2005-11-18 10:58:08.000000000 -0500
+++ shadow/76750.tmp.11649      2005-12-06 22:02:05.000000000 -0500
@@ -1,14 +1,14 @@
 Bug#: 76750
 Product: Mono: Class Libraries
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: 
-Status: NEW   
+Status: NEEDINFO   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Minor
 Component: CORLIB
 AssignedTo: [EMAIL PROTECTED]                            
 ReportedBy: [EMAIL PROTECTED]               
 QAContact: [EMAIL PROTECTED]
 TargetMilestone: ---
@@ -19,6 +19,21 @@
 MSDN says that SortedList(IDictionary d, IComparer comparer) throws an
 InvalidCastException if "comparer is a null reference, and one or more
 elements in d do not implement the IComparable interface". But our
 implementation ignores the first half of that; it throws the exception
 if any element of d is not IComparable, even if you passed in an
 explicit comparer.
+
+------- Additional Comments From [EMAIL PROTECTED]  2005-12-06 22:02 -------
+Well MSDN says so but I can't get the exception with this code (under
+both 1.1 SP1 and 2.0 final). Did you have a test case for this ?
+
+       Hashtable ht = new Hashtable ();
+       ht.Add ("a", 2);
+       ht.Add ("b", 1);
+       object o = new object ();
+       Assert ("object ISN'T IComparable", !(o is IComparable));
+       ht.Add ("c", o);
+       AssertEquals ("HT-Count", 3, ht.Count);
+       SortedList sl = new SortedList (ht, null);
+       AssertEquals ("SL-Count", 3, sl.Count);
+
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to