I know you can delegate an interface implementatio...
# multiplatform
g
I know you can delegate an interface implementation, but can you delegate a class functionality? If not why? I want to implement a class and use a delegate for most of its functionality, while overriding just a few methods, the closest thing i could find to this was lombok's @Delegate annotation, which i am not sure if it even works on kotlin jvm
a
You mean inheriting from two classes? If yes, then that is not possible by design in java, which also propagated to kotlin.
a
You can achieve the same with either abstract class or with a normal class having open methods with default implementations. Look at android.view.GestureDetector.SimpleOnGestureListener