16 lines
265 B
Kotlin
Vendored
16 lines
265 B
Kotlin
Vendored
// KJS_WITH_FULL_RUNTIME
|
|
class A {
|
|
private val sb: StringBuilder = StringBuilder()
|
|
|
|
operator fun String.unaryPlus() {
|
|
sb.append(this)
|
|
}
|
|
|
|
fun foo(): String {
|
|
+"OK"
|
|
return sb.toString()!!
|
|
}
|
|
}
|
|
|
|
fun box(): String = A().foo()
|