Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt
T
2018-06-28 12:26:41 +02:00

13 lines
315 B
Kotlin
Vendored

// IGNORE_BACKEND: 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
}