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
@@ -33,9 +33,9 @@ class Delegate {
class Result {
private /* final field */ val contextReceiverField0: Int
constructor(<this>: Int) /* primary */ {
constructor(_context_receiver_0: Int) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = <this>
<this>.#contextReceiverField0 = _context_receiver_0
/* <init>() */
}
@@ -53,7 +53,7 @@ class Result {
fun box(): String {
val result: Result = with<Int, Result>(receiver = 1, block = local fun Int.<anonymous>(): Result {
return Result(<this> = $this$with)
return Result(_context_receiver_0 = $this$with)
}
)
result.<set-s>(<set-?> = "OK")