Internal methods in interface


#1

I like to see the option to add internal methods to an internal interface.

example:

internal interface MyInterface{
    internal fun myFun()
}
class Test : MyInterface{
   override internal fun myFun() = Unit
}

#2

Internal interface cannot expose public methods (interface itself is not public).


#3

I updated my suggestion.
(the next time I try to be clear from the beginning)


#4

The question here is can you inherit from an internal interface (what about classes) and should you? At the same time I have similar wishes (I’d like to have protected members in interfaces - with default methods you almost get multiple inheritance).