https://bugzilla.novell.com/show_bug.cgi?id=332534

           Summary: IEnumerator.MoveNext for Dictionary throws an Exception
                    when it is at the end of the collection.
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: System
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


Created an attachment (id=177369)
 --> (https://bugzilla.novell.com/attachment.cgi?id=177369)
A simple application showing the problem.

Description of Problem:
If you get an Enumerator for a Dictionary and reach the end of the collection,
MoveNext will throw an exception. This does not happen in .NET.

Steps to reproduce the problem:
Compile the attached application with gmcs

Actual Results:
Unhandled Exception: System.IndexOutOfRangeException: Array index is out of
range.
  at
System.Collections.Generic.Dictionary`2+Enumerator[System.Int32,System.Int32].MoveNext
() [0x00000]
  at Program.Main (System.String[] args) [0x00000]

Expected Results:
no error.

How often does this happen? 
Always

Additional Information:
It seems to happen only in dictionary, List is working fine.
While not critical, this bug does not allow for two different methods to check
in the same enumerator to know if they are at the end.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to