mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
17 lines
349 B
Kotlin
Vendored
17 lines
349 B
Kotlin
Vendored
fun box(): String {
|
|
val three = 3
|
|
|
|
open class Local(val one: Int) {
|
|
open fun value() = "$three$one"
|
|
}
|
|
|
|
val four = 4
|
|
|
|
class Derived(val two: Int) : Local(1) {
|
|
override fun value() = super.value() + "$four$two"
|
|
}
|
|
|
|
val result = Derived(2).value()
|
|
return if (result == "3142") "OK" else "Fail: $result"
|
|
}
|