i have an abstract class with a type parameter:
abstract class AClass<T>(){ ___ }
however, i want to specify that the type T must be a child of AClass itself.
abstract class AClass<T : AClass>(){ ___ }
this doesnt work. I also tried:
abstract class AClass<T : AClass<*>>(){ ___ }
but the IDE gives me a “Finite Bound Restriction” Error.
Is it even possible to achieve the desired behaviour in Kotlin?