Files
2024-02-16 10:19:38 +00:00

39 lines
814 B
Kotlin
Vendored

class MyClass {
val value: String
field = value
get
constructor(value: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun box(): String {
val testO: String
val testO$delegate: String = MyClass(value = "O").provideDelegate(host = null, p = ::testO)
local get(): String {
return testO$delegate.getValue(receiver = null, p = ::testO)
}
val testK: String
val testK$delegate: String = "K"
local get(): String {
return testK$delegate.getValue(receiver = null, p = ::testK)
}
val testOK: String = <get-testO>().plus(other = <get-testK>())
return testOK
}
operator fun String.getValue(receiver: Any?, p: Any): String {
return <this>
}
operator fun MyClass.provideDelegate(host: Any?, p: Any): String {
return <this>.<get-value>()
}