diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-27 05:41:47 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-27 05:41:47 +0000 |
commit | 0c8e2195960d47e5b9be93efb7c95802ae40dca6 (patch) | |
tree | 4546dbdde688402560032002b62fbea9d84b1343 /test | |
parent | ec127ce60de679809a75c3c85f25ec4256b9dd13 (diff) | |
download | scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.tar.gz scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.tar.bz2 scala-0c8e2195960d47e5b9be93efb7c95802ae40dca6.zip |
TraversableOnce. Review by odersky.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/lib/scalacheck-1.7-SNAPSHOT.jar.desired.sha1 | 2 | ||||
-rw-r--r-- | test/files/pos/spec-List.scala | 12 |
2 files changed, 4 insertions, 10 deletions
diff --git a/test/files/lib/scalacheck-1.7-SNAPSHOT.jar.desired.sha1 b/test/files/lib/scalacheck-1.7-SNAPSHOT.jar.desired.sha1 index 79078c0d8b..7e2fa52b0c 100644 --- a/test/files/lib/scalacheck-1.7-SNAPSHOT.jar.desired.sha1 +++ b/test/files/lib/scalacheck-1.7-SNAPSHOT.jar.desired.sha1 @@ -1 +1 @@ -9b93490d8c081691f328fa3aa03946ea4cfe6697 ?scalacheck-1.7-SNAPSHOT.jar +4c76385b1a9cb7cd619739776b940d98c4aadc6d ?scalacheck-1.7-SNAPSHOT.jar diff --git a/test/files/pos/spec-List.scala b/test/files/pos/spec-List.scala index 9535eaa32a..6a506aa4be 100644 --- a/test/files/pos/spec-List.scala +++ b/test/files/pos/spec-List.scala @@ -144,18 +144,12 @@ sealed trait List[@specialized +A] extends LinearSeq[A] /** Create a new list which contains all elements of this list * followed by all elements of Traversable `that' */ - override def ++[B >: A, That](that: Traversable[B])(implicit bf: CanBuildFrom[List[A], B, That]): That = { + override def ++[B >: A, That](xs: TraversableOnce[B])(implicit bf: CanBuildFrom[List[A], B, That]): That = { val b = bf(this) - if (b.isInstanceOf[ListBuffer[_]]) (this ::: that.toList).asInstanceOf[That] - else super.++(that) + if (b.isInstanceOf[ListBuffer[_]]) (this ::: xs.toList).asInstanceOf[That] + else super.++(xs) } - /** Create a new list which contains all elements of this list - * followed by all elements of Iterator `that' - */ - override def ++[B >: A, That](that: Iterator[B])(implicit bf: CanBuildFrom[List[A], B, That]): That = - this ++ that.toList - /** Overrides the method in Iterable for efficiency. * * @return the list itself |