mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
17 lines
295 B
Kotlin
Vendored
17 lines
295 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// 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()
|