summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/immutable/Set.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/collection/immutable/Set.scala')
-rw-r--r--src/library/scala/collection/immutable/Set.scala11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/library/scala/collection/immutable/Set.scala b/src/library/scala/collection/immutable/Set.scala
index 8433c2b002..a888955bb2 100644
--- a/src/library/scala/collection/immutable/Set.scala
+++ b/src/library/scala/collection/immutable/Set.scala
@@ -8,7 +8,8 @@
-package scala.collection
+package scala
+package collection
package immutable
import generic._
@@ -32,7 +33,15 @@ trait Set[A] extends Iterable[A]
with Parallelizable[A, ParSet[A]]
{
override def companion: GenericCompanion[Set] = Set
+
+
+ /** Returns this $coll as an immutable map.
+ *
+ * A new map will not be built; lazy collections will stay lazy.
+ */
+ @deprecatedOverriding("Immutable sets should do nothing on toSet but return themselves cast as a Set.", "2.11.0")
override def toSet[B >: A]: Set[B] = this.asInstanceOf[Set[B]]
+
override def seq: Set[A] = this
protected override def parCombiner = ParSet.newCombiner[A] // if `immutable.SetLike` gets introduced, please move this there!
}