diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/collectGenericCC.scala | 2 | ||||
-rw-r--r-- | test/files/pos/spec-List.scala | 4 | ||||
-rw-r--r-- | test/files/run/colltest1.check | 10 | ||||
-rw-r--r-- | test/files/run/colltest1.scala | 2 |
4 files changed, 15 insertions, 3 deletions
diff --git a/test/files/pos/collectGenericCC.scala b/test/files/pos/collectGenericCC.scala index 0195993154..9840f1071d 100644 --- a/test/files/pos/collectGenericCC.scala +++ b/test/files/pos/collectGenericCC.scala @@ -8,7 +8,7 @@ object Test { b.result } - collect[Int, IndexedSeq[Int]](List(1,2,3,4)) + collect[Int, Vector[Int]](List(1,2,3,4)) collect[Char, String](List('1','2','3','4')) collect[Char, Array[Char]](List('1','2','3','4')) }
\ No newline at end of file diff --git a/test/files/pos/spec-List.scala b/test/files/pos/spec-List.scala index 039599eb00..17291fae56 100644 --- a/test/files/pos/spec-List.scala +++ b/test/files/pos/spec-List.scala @@ -29,7 +29,7 @@ sealed abstract class List[@specialized +A] extends LinearSeq[A] with LinearSeqLike[A, List[A]] { override def companion: GenericCompanion[List] = List - import scala.collection.{Iterable, Traversable, Seq, IndexedSeq} + import scala.collection.{Iterable, Traversable, Seq} /** Returns true if the list does not contain any elements. * @return <code>true</code>, iff the list is empty. @@ -494,7 +494,7 @@ final case class ::[@specialized B](private var hd: B, private[scala] var tl: Li */ object List extends SeqFactory[List] { - import collection.{Iterable, Seq, IndexedSeq} + import collection.{Iterable, Seq} implicit def builderFactory[A]: CanBuildFrom[Coll, A, List[A]] = new GenericCanBuildFrom[A] { diff --git a/test/files/run/colltest1.check b/test/files/run/colltest1.check index b76a7f324a..b49d328be4 100644 --- a/test/files/run/colltest1.check +++ b/test/files/run/colltest1.check @@ -72,6 +72,16 @@ new test starting with List() 9: List(2, 3, 4, 5, 6, 7, 8, 9, 10) 1 List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) +new test starting with IndexedSeq() +10: IndexedSeq(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) +9: IndexedSeq(2, 3, 4, 5, 6, 7, 8, 9, 10) +1 +IndexedSeq(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) +new test starting with Vector() +10: Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) +9: Vector(2, 3, 4, 5, 6, 7, 8, 9, 10) +1 +Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) new test starting with List() 10: List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) 9: List(2, 3, 4, 5, 6, 7, 8, 9, 10) diff --git a/test/files/run/colltest1.scala b/test/files/run/colltest1.scala index 1ce73396f0..081522d3f6 100644 --- a/test/files/run/colltest1.scala +++ b/test/files/run/colltest1.scala @@ -213,6 +213,8 @@ object Test extends Application { sequenceTest(mutable.Seq()) sequenceTest(immutable.Seq()) sequenceTest(LinearSeq()) + sequenceTest(IndexedSeq()) + sequenceTest(Vector()) // sequenceTest(mutable.LinearSeq()) sequenceTest(immutable.LinearSeq()) sequenceTest(mutable.IndexedSeq()) |