16 lines
332 B
Kotlin
Vendored
16 lines
332 B
Kotlin
Vendored
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
|
|
} |