Files
kotlin-fork/compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnSuspendLambdaInField.kt
T
2021-09-10 16:29:16 +03:00

14 lines
300 B
Kotlin
Vendored

// !OPT_IN: kotlin.reflect.jvm.ExperimentalReflectionOnLambdas
// 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"
}