superTypeDistance

fun KClass<*>.superTypeDistance(other: KClass<*>): Int?

How many steps up other's supertype hierarchy this KClass is found at (0 if other == this), or null if this is not a supertype of other at all. Used to rank overload candidates: the closer a formal parameter type is to an argument's actual type, the better the match.

Throws