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

17 lines
358 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
import kotlin.reflect.KProperty
class Delegate {
operator fun provideDelegate(thisRef: Any?, property: KProperty<*>) = this
operator fun getValue(thisRef: Any?, property: KProperty<*>) = "OK"
}
class TestClass {
companion object {
val test by Delegate()
}
}
fun box(): String {
return TestClass.test
}