like this:
open class Father(
val name:String = ""
)
data class Son(
val age:Int = 1
):Father()
fun main(args: Array<String>) {
val son = Son(
name = "",
age = 10
)
}
I cannot init "name" attribute of Son because of it is from Parent Class Father. How can I fix this?