Files
kotlin-fork/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineString.kt
T
Dmitry Petrov d94912ed62 JVM_IR indy-lambdas: initial implementation and tests
KT-44278 KT-26060 KT-42621
2021-02-03 14:16:22 +03:00

17 lines
305 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// JVM_TARGET: 1.8
// LAMBDAS: INDY
inline class Z(val value: String)
fun foo1(fs: (Z) -> Z) = fs(Z("O"))
fun box(): String {
val t = foo1 { Z(it.value + "K") }
if (t.value != "OK") return "Failed: t=$t"
return "OK"
}