Considering Java types (like Collection) as subtypes of Kotlin types (like MutableCollection)

99 Views Asked by At

Kotlin somehow considers java.util.Collection as extending kotlin.collections.MutableCollection.

Is there any way for this same functionality to be used by code written outside the Kotlin standard libraries?

e.g., I want to create my own Kotlin NavigableMap & MutableNavigableMap interfaces (with the latter extending the former). I want java.util.NavigableMap considered as extending my MutableNavigableMap.

0

There are 0 best solutions below