interface IA {
fun callMe()
}
abstract class AbstractA {
abstract fun callMe()
}
// Allowed
class ImplementationA(a: IA): IA by a
//Why this is Not Allowed ?
class ImplementationA(a: AbstractA): AbstractA() by a
I could not find any satisfactory reason on why Abstract class cannot be delegated using "by" keyword.
Note:
Saying that we need to call constructor of Abstract class while extending it
, this is not a satisfactory technical answer for the problem.