KT-57491 Prefix context receivers with $context_receiver_

This commit is contained in:
Pavel Mikhailovskii
2023-03-23 16:23:09 +00:00
committed by Space Team
parent f3592088fe
commit 0e6da53af8
82 changed files with 920 additions and 919 deletions
@@ -47,32 +47,32 @@ var operationScore: Int
get
set
operator fun MyContainer.get(_context_receiver_0: Int, index: Int): Int {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
operator fun MyContainer.get($context_receiver_0: Int, index: Int): Int {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return when {
EQEQ(arg0 = index, arg1 = 0) -> <this>.<get-i>()
else -> -1
}
}
operator fun MyContainer.plusAssign(_context_receiver_0: Int, other: MyContainer) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
operator fun MyContainer.plusAssign($context_receiver_0: Int, other: MyContainer) {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
<this>.<set-i>(<set-?> = <this>.<get-i>().plus(other = other.<get-i>()))
}
operator fun MyContainer.inc(_context_receiver_0: Int): MyContainer {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
operator fun MyContainer.inc($context_receiver_0: Int): MyContainer {
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = $context_receiver_0))
return MyContainer(i = <this>.<get-i>().plus(other = 1))
}
fun box(): String {
var myContainer: MyContainer = MyContainer(i = 0)
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
myContainer.plusAssign(_context_receiver_0 = $this$with, other = MyContainer(i = { // BLOCK
myContainer.plusAssign($context_receiver_0 = $this$with, other = MyContainer(i = { // BLOCK
val <unary>: MyContainer = myContainer
myContainer = <unary>.inc(_context_receiver_0 = $this$with)
myContainer = <unary>.inc($context_receiver_0 = $this$with)
<unary>
}.get(_context_receiver_0 = $this$with, index = 0)))
}.get($context_receiver_0 = $this$with, index = 0)))
}
)
return when {