1663619606
Otherwise kotlin-reflect won't find it (and it won't even be serialized anyway). #KT-42562 Fixed
21 lines
384 B
Kotlin
Vendored
21 lines
384 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// IGNORE_BACKEND: JVM
|
|
// WITH_REFLECT
|
|
// FILE: 1.kt
|
|
package test
|
|
|
|
import kotlin.reflect.*
|
|
|
|
inline operator fun String.getValue(t:Any?, p: KProperty<*>): String =
|
|
if (p.returnType.classifier == String::class) this else "fail"
|
|
|
|
inline fun foo(crossinline f: () -> String) = {
|
|
val x by f()
|
|
x
|
|
}()
|
|
|
|
// FILE: 2.kt
|
|
import test.*
|
|
|
|
fun box() = foo { "OK" }
|