Files
kotlin/compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt
2018-06-09 19:15:38 +03:00

16 lines
265 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
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()