Files
kotlin-fork/compiler/testData/ir/irText/declarations/provideDelegate/member.kt
T
Dmitry Petrov 885f397cdd KT-16535 'provideDelegate' convention is not supported in IR
Implement provideDelegate convention support.
NB delegate type now depends on 'provideDelegate' convention resolution.
2017-03-01 09:25:38 +03:00

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")
}