summaryrefslogtreecommitdiff
path: root/test/files/run/indexedSeq.scala
blob: 29a8be701d627c3ab7c6099d8ba9bc47d0301ba5 (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)
  }
}