ComparePriority2

Allows comparison between A and B when B is a subtype of A.

This implicit is defined separately from ComparePriority1 in order to avoid diverging implicit search when comparing equal types.

class Object
trait Matchable
class Any
object Compare.type

Implicits

Implicits

implicit def compareSupertypeWithSubtype[A, B](implicit ev: A <:< B): Compare[B, A]