Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/kt3298.kt
T
2019-11-19 11:00:09 +03:00

15 lines
300 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
var result = ""
fun result(r: String) { result = r }
object Foo {
private operator fun String.unaryPlus() = "(" + this + ")"
fun foo() = { result(+"Stuff") }()
}
fun box(): String {
Foo.foo()
return if (result == "(Stuff)") "OK" else "Fail $result"
}