diff options
Diffstat (limited to 'src/library/scala/collection/immutable/ListSet.scala')
-rw-r--r-- | src/library/scala/collection/immutable/ListSet.scala | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/library/scala/collection/immutable/ListSet.scala b/src/library/scala/collection/immutable/ListSet.scala index a6e6fba0a5..adc975479a 100644 --- a/src/library/scala/collection/immutable/ListSet.scala +++ b/src/library/scala/collection/immutable/ListSet.scala @@ -138,13 +138,6 @@ class ListSet[A] extends AbstractSet[A] override def stringPrefix = "ListSet" - /** Returns this $coll as an immutable set. - * - * A new set 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]] - /** Represents an entry in the `ListSet`. */ protected class Node(override val head: A) extends ListSet[A] with Serializable { @@ -186,4 +179,6 @@ class ListSet[A] extends AbstractSet[A] override def tail: ListSet[A] = self } + + override def toSet[B >: A]: Set[B] = this.asInstanceOf[ListSet[B]] } |