KT-52791 Make it possible to pass multiple context receivers to a class

This commit is contained in:
Pavel Mikhailovskii
2022-12-28 11:21:03 +00:00
committed by Space Team
parent 62217b39ec
commit 906c161068
38 changed files with 180 additions and 516 deletions
@@ -13,9 +13,9 @@ class Outer {
class Inner {
private /* final field */ val contextReceiverField0: Outer
constructor(<this>: Outer, arg: Any) /* primary */ {
constructor(_context_receiver_0: Outer, arg: Any) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = <this>
<this>.#contextReceiverField0 = _context_receiver_0
/* <init>() */
}
@@ -28,7 +28,7 @@ class Inner {
fun f(outer: Outer) {
with<Outer, Inner>(receiver = outer, block = local fun Outer.<anonymous>(): Inner {
return Inner(<this> = $this$with, arg = 3)
return Inner(_context_receiver_0 = $this$with, arg = 3)
}
) /*~> Unit */
}