class TestA {
init {}
open fun testOpen() {
println(this)
}
}
class TestB : TestA {
override fun testOpen() {
super.testOpen()
}
}
它没有编译,说:
error: this type is final, so it cannot be inherited from
class TestB : TestA {
^
basic.kts:39:15: error: this type has a constructor, and thus must be initialized here