Closed DReigada closed 5 years ago
In the documentation Ordering
is just an example (Commonly used examples are...) and does not refer to scala.math.Ordering
. With a user defined Ordering
typeclass and the appropriate typeclass derivation infrastructure in its companion object this should work as intended!
But that is a very misleading doc. it should be explained in advanced
I agree that the doc is subpar. I had to learn the impl recently for checkUnused. It's just a convention but the doc sounds like magic.
The typeclass derivation example for ordering (shown here: http://dotty.epfl.ch/docs/reference/contextual/derivation.html) is not compiling.
It seems that the
Ordering
companion object does not define thederived
method.