Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt
T
2019-11-19 11:00:09 +03:00

13 lines
319 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
import kotlin.reflect.KProperty
class Delegate {
operator fun provideDelegate(instance: Any?, property: KProperty<*>): Delegate = this
operator fun getValue(instance: Any?, property: KProperty<*>) = "OK"
}
val result: String by Delegate()
fun box(): String {
return result
}