Q:

Is it possible to satisfy an interface member implementation using another interface in Kotlin?

For example, if I have an interface like this:
interface MyInterface {
    fun thouMustImplementThis()
}

And I have a class MyClass that implement MyInterface which means I have to create an override for the function:
class MyClass : View, MyInterface {
    override fun thouMustImplementThis() {
        println ("Hello world")
    }
}

Is it possible if I have another interface that implement the function:
interface YourInterface {
    fun thouMustImplementThis() {
        println ("Hello Stack Overflow")
    }
}

So I can leave the implementation out from my class:
class MyClass : View, MyInterface, YourInterface {

}

But I found out that I still have to implement the function, albeit I only need to add a call to its super function version.
class MyClass : View, MyInterface, YourInterface {

    override fun thouMustImplementThis() {
        super.thouMustImplementThis()
    }
}

and I don't want this.
The point is, I want to create some kind of default implementation for some native interfaces so that I don't have to reimplement them each time I create a class based on those interfaces. I was thinking that by making it as an interface, I can "attach" the implementation as I need. Is there any workaround for this?

A:

You can just have the interface implement the other interface.
Like this:
interface YourInterface : MyInterface {
    override fun thouMustImplementThis() {
        println("Hello Stack Overflow")
    }
}

Now, the class can be implemented like this (no need for a body):
class MyClass : View, YourInterface

