Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt
T
2020-03-12 17:22:33 +03:00

28 lines
410 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: 1.kt
// FULL_JDK
package test
import java.util.concurrent.Callable
fun test(): String = ""
inline fun String.switchMapOnce(crossinline mapper: (String) -> String): String {
Callable(::test)
return { mapper(this) }()
}
// FILE: 2.kt
import test.*
fun box() : String {
return "O".switchMapOnce {
"K".switchMapOnce {
"OK"
}
}
}