summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/GenSeqLike.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-04-24 20:13:40 +0000
committerMartin Odersky <odersky@gmail.com>2011-04-24 20:13:40 +0000
commit290f3711d51da0e013e37ef2703cf976a26747cf (patch)
tree8097db9aef65c240f618051fef56926928de060a /src/library/scala/collection/GenSeqLike.scala
parent60463a8721728545d7d626d96f77e8688084c71f (diff)
downloadscala-290f3711d51da0e013e37ef2703cf976a26747cf.tar.gz
scala-290f3711d51da0e013e37ef2703cf976a26747cf.tar.bz2
scala-290f3711d51da0e013e37ef2703cf976a26747cf.zip
Added a bunch of bridges to make ameliorate bin...
Added a bunch of bridges to make ameliorate binary compatibility of new collections. Review by prokopec. Review by extempore.
Diffstat (limited to 'src/library/scala/collection/GenSeqLike.scala')
-rw-r--r--src/library/scala/collection/GenSeqLike.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/library/scala/collection/GenSeqLike.scala b/src/library/scala/collection/GenSeqLike.scala
index 1502853d8e..f5e8113d28 100644
--- a/src/library/scala/collection/GenSeqLike.scala
+++ b/src/library/scala/collection/GenSeqLike.scala
@@ -9,6 +9,7 @@
package scala.collection
import generic._
+import annotation.bridge
/** A template trait for all sequences which may be traversed
* in parallel.
@@ -209,6 +210,9 @@ private[collection] trait GenSeqLike[+A, +Repr] extends GenIterableLike[A, Repr]
*/
def startsWith[B](that: GenSeq[B]): Boolean = startsWith(that, 0)
+ @bridge
+ def startsWith[B](that: Seq[B]): Boolean = startsWith(that: GenSeq[B])
+
/** Tests whether this $coll contains the given sequence at a given index.
*
* If the both the receiver object, <code>this</code> and
@@ -338,6 +342,10 @@ private[collection] trait GenSeqLike[+A, +Repr] extends GenIterableLike[A, Repr]
*/
def union[B >: A, That](that: GenSeq[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = this ++ that
+ @bridge
+ def union[B >: A, That](that: Seq[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =
+ union(that: GenSeq[B])(bf)
+
/** Computes the multiset difference between this $coll and another sequence.
* $willNotTerminateInf
*