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

35 lines
600 B
Plaintext
Vendored

class Outer {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = 1
get
}
class Inner {
private /* final field */ val contextReceiverField0: Outer
constructor(<this>: Outer, arg: Any) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = <this>
/* <init>() */
}
fun bar(): Int {
return <this>.#contextReceiverField0.<get-x>()
}
}
fun f(outer: Outer) {
with<Outer, Inner>(receiver = outer, block = local fun Outer.<anonymous>(): Inner {
return Inner(<this> = $this$with, arg = 3)
}
) /*~> Unit */
}