Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.1
    • Component/s: None
    • Labels:
      None

      Description

      The limit calculation used to determine when to end the loop is wrong, and will result in an ArrayIndexOutOfBoundsException for a non-zero start. This was pointed out in #scala tonight (possibly earlier).

      This patch adds test cases to handle this situation, as well as a situation where start itself exceed the array length. I elected not to add checks for negative start and length parameters, although these could easily be added.

        Issue Links

          Activity

          Show
          Adriaan Moors added a comment - https://github.com/scala/scala/pull/1785
          Hide
          Adriaan Moors added a comment -
          Show
          Adriaan Moors added a comment - 2.10.1-RC1: https://github.com/scala/scala/pull/1841

            People

            • Assignee:
              Erik Osheim
              Reporter:
              Erik Osheim
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development