Files
kotlin-fork/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

38 lines
813 B
Plaintext
Vendored

class MyClass {
constructor(value: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
val value: String
field = value
get
}
operator fun MyClass.provideDelegate(host: Any?, p: Any): String {
return <this>.<get-value>()
}
operator fun String.getValue(receiver: Any?, p: Any): String {
return <this>
}
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
}