This is the sample code:
class PurchaseHistory: MutableList<PurchaseInfo> by mutableListOf() {
override fun add(element: PurchaseInfo): Boolean {
// ... some code
return super.add(element)
}
}
However, I am getting abstract member cannot be accessed directly
. When I use the original method from outside the class, I don't encounter any issues, but why can't I do the same thing from inside of it?