In my scala eclipse worksheet I do:
val values: List[(Char, Int)] = List(('z', 7), ('b', 6))
//> values : List[(Char, Int)] = List((z,7), (b,6))
val sortedValues = values.sortBy(_._1) //> sortedValues : <error> = List((b,6), (z,7))
I cannot understand why the sortBy function gives an <error>
or how do find more information about it.
When I put the same code into a scala class, I get:
diverging implicit expansion for type scala.math.Ordering[B] starting with method Tuple9 in object Ordering
I see other threads with this error. But they are different cases.
Any help appreciated