scala / collection-strawman

Implementation of the new Scala 2.13 Collections
Apache License 2.0
200 stars 72 forks source link

Add toSortedSet operation to BitSet #500

Closed julienrf closed 6 years ago

julienrf commented 6 years ago

Fixes scala/collection-strawman#405

szeiger commented 6 years ago

Requiring an explicit toSortedSet call seems wrong. I think the correct solution for #405 is to get the priorities of the overloads right so you don't need this method. Making toSortedSet an upcast is also inconsistent with other to... methods where we often refine the return types further (i.e. BitSet.toSortedSet could be expected to return a BitSet).