I see, in 2.13.7, this code:
trait OptionOrdering[T] extends Ordering[Option[T]] {
def optionOrdering: Ordering[T]
def compare(x: Option[T], y: Option[T]) = (x, y) match {
case (None, None) => 0
case (None, _) => -1
case (_, None) => 1
case (Some(x), Some(y)) => optionOrdering.compare(x, y)
}
In my case, this goes all the way down to stackoverflow error: the same method is called in the last line. (I"m also puzzled by the idea that None
is above Some
, but that’s judgmental.)
What do you think?
Just asking, before filing a bug.