Scala collection SortedSet difficulties at 2.13.1

I updated the continuum library to work with the 2.13 collection.
All was fine at 2.13.0-M5, but from 2.13.0-RC1 I have an error that I don’t know how to fix.
At the following file


I get the error:

Error:(24, 7) incompatible type in overriding
protected def fromSpecific(coll: scala.collection.IterableOnce[continuum.Interval[T]]): scala.collection.immutable.IntervalSet[T] (defined in trait IterableOps)
  with override protected def fromSpecific(coll: scala.collection.IterableOnce[continuum.Interval[T]]): scala.collection.immutable.SortedSet[continuum.Interval[T]] (defined in trait SortedSetFactoryDefaults);
 found   : (coll: scala.collection.IterableOnce[continuum.Interval[T]])scala.collection.immutable.SortedSet[continuum.Interval[T]]
 required: (coll: scala.collection.IterableOnce[continuum.Interval[T]])scala.collection.immutable.IntervalSet[T];
 other members with override errors are: newSpecificBuilder
class IntervalSet[T](tree: RB.Tree[Interval[T], Unit])(implicit conv: T=>Ordered[T])

Hi.

I think you need to override the below method

/** The companion object of this sorted set, providing various factory methods. 
* * @note When implementing a custom collection type and refining `CC` to the new type, this
* method needs to be overridden to return a factory for the new type (the compiler will 
* issue an error otherwise). 
*/ 
def sortedIterableFactory: SortedIterableFactory[CC]

although it doesn’t look like you are refining the type of CC so perhaps not

Had another look.

It seems that you are refining the C type your generic arguments

Based on this comment in SortedSetFactoryDefaults

The default implementations in this trait can be used in the common case when `CC[A]` is the * same as `C`.

I think you need to refine the types of fromSpecific and newBuilder

Hello,

By extending SortedSet[Interval[T]], you inherit from SortedSetFactoryDefaults[Interval[T], SortedSet, Set], which provides implementations of fromSpecific and newSpecificBuilder that return a SortedSet[Interval[T]].

However, you also extend SortedSetOps[Interval[T], SortedSet, IntervalSet[T]], which raises the expected return type of these methods to IntervalSet[T].

Therefore, you have to override these two methods to effectively return an IntervalSet[T].

Also, does this page of the documentation help?