mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
15 lines
226 B
Kotlin
15 lines
226 B
Kotlin
class A {
|
|
private val sb: StringBuilder = StringBuilder()
|
|
|
|
fun String.plus() {
|
|
sb.append(this)
|
|
}
|
|
|
|
fun foo(): String {
|
|
+"OK"
|
|
return sb.toString()!!
|
|
}
|
|
}
|
|
|
|
fun box(): String = A().foo()
|