Files
kotlin-fork/compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnSuspendLambdaInField.kt
T
pyos e6c0575d3a JVM_IR: do not deep-copy suspend lambdas in initializers
This loses reflection metadata (and also sometimes fails). Which was
missing anyway - this is also fixed now.

 #KT-42554 Fixed
2020-10-09 22:11:00 +02:00

13 lines
237 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.jvm.reflect
class C {
val x: suspend (String) -> Unit = { OK: String -> }
}
fun box(): String {
return C().x.reflect()?.parameters?.singleOrNull()?.name ?: "null"
}