Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt
T
2021-10-01 17:18:49 +03:00

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()