Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/kt865.kt
T
2023-12-26 10:18:19 +00:00

20 lines
385 B
Kotlin
Vendored

// KJS_WITH_FULL_RUNTIME
// JVM_ABI_K1_K2_DIFF: KT-63864
class Template() {
val collected = ArrayList<String>()
operator fun String.unaryPlus() {
collected.add(this@unaryPlus)
}
fun test() {
+ "239"
}
}
fun box() : String {
val u = Template()
u.test()
return if(u.collected.size == 1 && u.collected.get(0) == "239") "OK" else "fail"
}