So I'm trying to write this using *Kotlin (generic...
# getting-started
b
So I'm trying to write this using Kotlin (generic):
Copy code
class SortClosedRanges<NumberType>
    : kotlin.Comparator<ClosedRange<NumberType>>
    where NumberType: Comparable<NumberType> {
    override fun compare(lhs: ClosedRange<NumberType>, rhs: ClosedRange<NumberType>): Int
        = lhs.compareTo(rhs)
}
But it emits this error on the second line:
Copy code
This type is final, so it cannot be inherited from