Files
kotlin-fork/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.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
273 B
Kotlin
Vendored

object Host {
class StringDelegate(val s: String) {
operator fun getValue(receiver: String, p: Any) = receiver + s
}
operator fun String.provideDelegate(host: Any?, p: Any) = StringDelegate(this)
val String.plusK by "K"
val ok = "O".plusK
}