mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
16 lines
309 B
Kotlin
Vendored
16 lines
309 B
Kotlin
Vendored
|
|
open class A(val s: String) {
|
|
open inner class B(val s: String) {
|
|
fun testB() = s + this@A.s
|
|
}
|
|
|
|
open inner class C(): A("C") {
|
|
fun testC() =
|
|
B("B_").testB()
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val res = A("A").C().testC()
|
|
return if (res == "B_C") "OK" else res;
|
|
} |