diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/spec-List.scala | 12 |
1 files changed, 3 insertions, 9 deletions
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 |