Having a base class I would like it and its descendent class be visible only internally:
internal abstract class BaseClass
internal open class Class_A: BaseClass()
internal open class Class_B: Class_A()
In place where the list of Class_A (may also contains Class_B in it), would like to make it protected for its own descendent class to access this list
open class User {
// got error: 'protected' property exposes its internal return type"
protected var class_A_list: List<Class_A>? = null
}
class User_descendent: User() {
// can access the class_A_list
}
How to let the descendent class access the instance of some "internal" class?