summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/GenSetLike.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/GenSetLike.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/GenSetLike.scala')
-rw-r--r--src/library/scala/collection/GenSetLike.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/library/scala/collection/GenSetLike.scala b/src/library/scala/collection/GenSetLike.scala
index d45810d2e7..1c998351b4 100644
--- a/src/library/scala/collection/GenSetLike.scala
+++ b/src/library/scala/collection/GenSetLike.scala
@@ -8,6 +8,8 @@
package scala.collection
+import annotation.bridge
+
/** A template trait for sets which may possibly
* have their operations implemented in parallel.
*
@@ -49,6 +51,9 @@ private[collection] trait GenSetLike[A, +Repr]
*/
def intersect(that: GenSet[A]): Repr = this filter that
+ @bridge
+ def intersect(that: Set[A]): Repr = intersect(that: GenSet[A])
+
/** Computes the intersection between this set and another set.
*
* '''Note:''' Same as `intersect`.
@@ -58,6 +63,9 @@ private[collection] trait GenSetLike[A, +Repr]
*/
def &(that: GenSet[A]): Repr = this intersect that
+ @bridge
+ def &(that: Set[A]): Repr = &(that: GenSet[A])
+
/** Computes the union between of set and another set.
*
* @param that the set to form the union with.
@@ -75,6 +83,9 @@ private[collection] trait GenSetLike[A, +Repr]
*/
def | (that: GenSet[A]): Repr = this union that
+ @bridge
+ def | (that: Set[A]): Repr = | (that: GenSet[A])
+
/** Computes the difference of this set and another set.
*
* @param that the set of elements to exclude.
@@ -92,6 +103,9 @@ private[collection] trait GenSetLike[A, +Repr]
*/
def &~(that: GenSet[A]): Repr = this diff that
+ @bridge
+ def &~(that: Set[A]): Repr = &~(that: GenSet[A])
+
/** Tests whether this set is a subset of another set.
*
* @param that the set to test.
@@ -100,6 +114,9 @@ private[collection] trait GenSetLike[A, +Repr]
*/
def subsetOf(that: GenSet[A]): Boolean = this forall that
+ @bridge
+ def subsetOf(that: Set[A]): Boolean = subsetOf(that: GenSet[A])
+
/** Compares this set with another object for equality.
*
* '''Note:''' This operation contains an unchecked cast: if `that`