Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.kt.txt
T
2021-12-02 20:24:36 +03:00

40 lines
698 B
Plaintext
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(<this>: O, k: String) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = <this>
/* <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(<this> = $this$with, k = "K")
return ok.<get-result>()
}
)
}