Extension methods and visibility

Well, this is not how protected visibility works in Kotlin. protected means “visible to that class and its subclasses”, nothing more; the namespace in which the class is defined doesn’t play any role in determining the visibility of its protected members. This is not, strictly speaking, a JVM issue (because protected has broader visibilty on the JVM), but this was a conscious design decision in Kotlin that we don’t have any plans to change at this time.