885f397cdd
Implement provideDelegate convention support. NB delegate type now depends on 'provideDelegate' convention resolution.
11 lines
277 B
Kotlin
Vendored
11 lines
277 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)
|
|
}
|
|
|
|
val testTopLevel by DelegateProvider("OK")
|
|
|