[Mono-bugs] [Bug 78475][Maj] New - SortedList throws InvalidOp when adding second key of type System.Type

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun May 21 09:20:53 EDT 2006


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 juraj at hotfeet.ch.

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

--- shadow/78475	2006-05-21 09:20:53.000000000 -0400
+++ shadow/78475.tmp.25988	2006-05-21 09:20:53.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 78475
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: FC5
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: juraj at hotfeet.ch               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SortedList throws InvalidOp when adding second key of type System.Type
+
+Test case:
+==================
+using System;
+using System.Collections;
+
+class Test {
+	static void Main() {
+		IDictionary dict = new SortedList();
+		dict.Add(typeof(object), "blah");
+		dict.Add(typeof(string), "blah");
+	}
+}
+===================
+
+Output:
+===================
+Unhandled Exception: System.InvalidOperationException: Operation is not
+valid due to the current state of the object
+in <0x00069> System.Collections.SortedList:PutImpl (System.Object key,
+System.Object value, Boolean overwrite)
+in <0x00012> System.Collections.SortedList:Add (System.Object key,
+System.Object value)
+in <0x0004b> Test:Main ()
+===================
+
+The exception should not be thrown.
+I'm using Mono from SVN (r60917).


More information about the mono-bugs mailing list