aboutsummaryrefslogtreecommitdiff
path: root/tests/run/indexedSeq.scala
blob: b1a2b1bc6060e54b6be204e177010d5584b10ef1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
object Test {
  import scala.collection.immutable

  def checkIdentity[A](xs: immutable.IndexedSeq[A]) = assert(xs.toIndexedSeq eq xs)

  def main(args: Array[String]): Unit = {
    def r = 1 to 10
    checkIdentity(immutable.Vector(r: _*))
    checkIdentity(r.toIndexedSeq)
  }
}