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
18 lines
436 B
Kotlin
Vendored
18 lines
436 B
Kotlin
Vendored
// !USE_EXPERIMENTAL: kotlin.reflect.jvm.ExperimentalReflectionOnLambdas
|
|
// TARGET_BACKEND: JVM
|
|
// WITH_REFLECT
|
|
|
|
import kotlin.reflect.jvm.reflect
|
|
|
|
class C {
|
|
val o = { O: String -> }
|
|
val k = { K: String -> }
|
|
|
|
constructor(y: Int)
|
|
constructor(y: String)
|
|
}
|
|
|
|
fun box(): String =
|
|
(C(0).o.reflect()?.parameters?.singleOrNull()?.name ?: "null") +
|
|
(C("").k.reflect()?.parameters?.singleOrNull()?.name ?: "null")
|