Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Scala 2.11.0-M2
    • Fix Version/s: Scala 2.11.0-M8
    • Component/s: None
    • Labels:
      None

      Description

      As simple as this:

      scala> val a = new Vector(1,2,4)
      java.lang.NullPointerException
      at scala.collection.immutable.VectorIterator.next(Vector.scala:646)
      at scala.collection.Iterator$$anon$10.next(Iterator.scala:347)
      ...

        Activity

        Hide
        Jason Zaugg added a comment -

        That constructor should really be private. We would have to work within (or around) source compatibility constraints to make it so.

        Show
        Jason Zaugg added a comment - That constructor should really be private. We would have to work within (or around) source compatibility constraints to make it so.
        Hide
        Paul Phillips added a comment -

        I think the bug is that the constructor is not private. What exactly is a user going to pass for startIndex, endIndex, and focus?

        Show
        Paul Phillips added a comment - I think the bug is that the constructor is not private. What exactly is a user going to pass for startIndex, endIndex, and focus?
        Hide
        Paul Phillips added a comment -

        Jinx! 1-2-3-4-5-6-7-8-9-10

        Show
        Paul Phillips added a comment - Jinx! 1-2-3-4-5-6-7-8-9-10
        Hide
        Eugene Vigdorchik added a comment -

        Ok, same thing happens with 2.10.1. Can we still tighten the visibility of the constructor for 2.11?

        Show
        Eugene Vigdorchik added a comment - Ok, same thing happens with 2.10.1. Can we still tighten the visibility of the constructor for 2.11?
        Hide
        Eugene Vigdorchik added a comment -

        The question is if it ever works calling the constructor directly? If it doesn't, then we can assume it hasn't been called outside and the visibility can be reduced.

        Show
        Eugene Vigdorchik added a comment - The question is if it ever works calling the constructor directly? If it doesn't, then we can assume it hasn't been called outside and the visibility can be reduced.
        Show
        Jason Zaugg added a comment - https://github.com/scala/scala/pull/3215

          People

          • Assignee:
            Jason Zaugg
            Reporter:
            Eugene Vigdorchik
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development