19 lines
228 B
Kotlin
Vendored
19 lines
228 B
Kotlin
Vendored
abstract class Base() {
|
|
init {
|
|
foo()
|
|
}
|
|
|
|
abstract fun foo()
|
|
}
|
|
|
|
class Derived(val x: String) : Base() {
|
|
override fun foo() {
|
|
x?.length
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
Derived("")
|
|
return "OK"
|
|
}
|