mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
19 lines
341 B
Kotlin
Vendored
19 lines
341 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
package p
|
|
|
|
private class C(val y: Int) {
|
|
val initChild = { ->
|
|
object {
|
|
override fun toString(): String {
|
|
return "child" + y
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val c = C(3).initChild
|
|
val x = c().toString()
|
|
return if (x == "child3") "OK" else x
|
|
}
|