mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 00:21:28 +00:00
16 lines
240 B
Kotlin
Vendored
16 lines
240 B
Kotlin
Vendored
class A(val value: String)
|
|
|
|
fun A.test(): String {
|
|
val o = object {
|
|
val z: String
|
|
init {
|
|
val x = value + "K"
|
|
z = x
|
|
}
|
|
}
|
|
return o.z
|
|
}
|
|
|
|
fun box(): String {
|
|
return A("O").test()
|
|
} |