How to call extension function of the base class in a derived class using the super keyword?
I tried to call using super but it doesn't work.
open class abc {
open fun aa() {
println("function in abc")
}
}
fun abc.sum() {
println("extension function")
}
class ab: abc() {
override fun aa() {
super.aa()
println("functon in ab")
}
fun sum() {
super.sum()
println("sum function")
}
}
fun main(args: Array < String > ) {
var aa: ab = ab()
aa.aa()
aa.aa()
aa.sum()
}
Here is the 16th number line error comes, I can't call the extension function.