Files
kotlin-fork/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.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

19 lines
339 B
Kotlin
Vendored

// WITH_RUNTIME
class MyClass(val value: String)
operator fun MyClass.provideDelegate(host: Any?, p: Any): String =
this.value
operator fun String.getValue(receiver: Any?, p: Any): String =
this
fun box(): String {
val testO by MyClass("O")
val testK by "K"
val testOK = testO + testK
return testOK
}