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

37 lines
733 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>
}
val testO: String /* by */
field = MyClass(value = "O").provideDelegate(host = null, p = ::testO)
get(): String {
return #testO$delegate.getValue(receiver = null, p = ::testO)
}
val testK: String /* by */
field = "K"
get(): String {
return #testK$delegate.getValue(receiver = null, p = ::testK)
}
val testOK: String
field = <get-testO>().plus(other = <get-testK>())
get