Files
kotlin-fork/compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt
T
2019-11-19 11:00:09 +03:00

16 lines
347 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
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
}
fun box(): String = Host.ok