Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.kt.txt
T
2023-03-23 16:23:09 +00:00

40 lines
737 B
Kotlin
Vendored

class O {
constructor(o: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
val o: String
field = o
get
}
class OK {
private /* final field */ val contextReceiverField0: O
constructor($context_receiver_0: O, k: String) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = $context_receiver_0
/* <init>() */
}
val k: String
field = k
get
val result: String
field = <this>.#contextReceiverField0.<get-o>().plus(other = <this>.<get-k>())
get
}
fun box(): String {
return with<O, String>(receiver = O(o = "O"), block = local fun O.<anonymous>(): String {
val ok: OK = OK($context_receiver_0 = $this$with, k = "K")
return ok.<get-result>()
}
)
}