885f397cdd
Implement provideDelegate convention support. NB delegate type now depends on 'provideDelegate' convention resolution.
19 lines
339 B
Kotlin
Vendored
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
|
|
}
|