885f397cdd
Implement provideDelegate convention support. NB delegate type now depends on 'provideDelegate' convention resolution.
13 lines
294 B
Kotlin
Vendored
13 lines
294 B
Kotlin
Vendored
class Delegate(val value: String) {
|
|
operator fun getValue(thisRef: Any?, property: Any?) = value
|
|
}
|
|
|
|
class DelegateProvider(val value: String) {
|
|
operator fun provideDelegate(thisRef: Any?, property: Any?) = Delegate(value)
|
|
}
|
|
|
|
class Host {
|
|
val testMember by DelegateProvider("OK")
|
|
}
|
|
|