fc36178f3a
This function was always experimental, as explained in its kdoc, but it was introduced before opt-in requirement markers were supported. Thus, breaking changes (such as in KT-42746) were always expected, and the `@ExperimentalReflectionOnLambdas` annotation just makes it clearer. #KT-45486 Fixed
14 lines
284 B
Kotlin
Vendored
14 lines
284 B
Kotlin
Vendored
// !USE_EXPERIMENTAL: kotlin.reflect.jvm.ExperimentalReflectionOnLambdas
|
|
// TARGET_BACKEND: JVM
|
|
// WITH_REFLECT
|
|
|
|
import kotlin.reflect.jvm.reflect
|
|
|
|
class C {
|
|
val x = { OK: String -> }
|
|
}
|
|
|
|
fun box(): String {
|
|
return C().x.reflect()?.parameters?.singleOrNull()?.name ?: "null"
|
|
}
|