Standardize context receiver parameter names
Previously, FIR used `_context_receiver_n` while FE10 used `<this>` for all context receiver parameters. This commit changes the code in FE10 to follow the convention from FIR.
This commit is contained in:
committed by
Alexander Udalov
parent
5cf1a88c42
commit
21fef70367
Vendored
+20
-20
@@ -47,16 +47,16 @@ var operationScore: Int
|
||||
get
|
||||
set
|
||||
|
||||
operator fun Result.plus(<this>: Int, other: Result): Result {
|
||||
operator fun Result.plus(_context_receiver_0: Int, other: Result): Result {
|
||||
{ // BLOCK
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
||||
}
|
||||
return Result(i = <this>.<get-i>().plus(other = other.<get-i>()))
|
||||
}
|
||||
|
||||
operator fun Result.plusAssign(<this>: Int, other: Result) {
|
||||
operator fun Result.plusAssign(_context_receiver_0: Int, other: Result) {
|
||||
{ // BLOCK
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: Result = <this>
|
||||
@@ -64,16 +64,16 @@ operator fun Result.plusAssign(<this>: Int, other: Result) {
|
||||
}
|
||||
}
|
||||
|
||||
operator fun Result.minus(<this>: Int, other: Result): Result {
|
||||
operator fun Result.minus(_context_receiver_0: Int, other: Result): Result {
|
||||
{ // BLOCK
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
||||
}
|
||||
return Result(i = <this>.<get-i>().minus(other = other.<get-i>()))
|
||||
}
|
||||
|
||||
operator fun Result.minusAssign(<this>: Int, other: Result) {
|
||||
operator fun Result.minusAssign(_context_receiver_0: Int, other: Result) {
|
||||
{ // BLOCK
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: Result = <this>
|
||||
@@ -81,16 +81,16 @@ operator fun Result.minusAssign(<this>: Int, other: Result) {
|
||||
}
|
||||
}
|
||||
|
||||
operator fun Result.times(<this>: Int, other: Result): Result {
|
||||
operator fun Result.times(_context_receiver_0: Int, other: Result): Result {
|
||||
{ // BLOCK
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
||||
}
|
||||
return Result(i = <this>.<get-i>().times(other = other.<get-i>()))
|
||||
}
|
||||
|
||||
operator fun Result.timesAssign(<this>: Int, other: Result) {
|
||||
operator fun Result.timesAssign(_context_receiver_0: Int, other: Result) {
|
||||
{ // BLOCK
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: Result = <this>
|
||||
@@ -98,16 +98,16 @@ operator fun Result.timesAssign(<this>: Int, other: Result) {
|
||||
}
|
||||
}
|
||||
|
||||
operator fun Result.div(<this>: Int, other: Result): Result {
|
||||
operator fun Result.div(_context_receiver_0: Int, other: Result): Result {
|
||||
{ // BLOCK
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
||||
}
|
||||
return Result(i = <this>.<get-i>().div(other = other.<get-i>()))
|
||||
}
|
||||
|
||||
operator fun Result.divAssign(<this>: Int, other: Result) {
|
||||
operator fun Result.divAssign(_context_receiver_0: Int, other: Result) {
|
||||
{ // BLOCK
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
|
||||
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
||||
}
|
||||
{ // BLOCK
|
||||
val tmp0_this: Result = <this>
|
||||
@@ -118,10 +118,10 @@ operator fun Result.divAssign(<this>: Int, other: Result) {
|
||||
fun box(): String {
|
||||
val result: Result = Result(i = 0)
|
||||
with<Int, Unit>(receiver = 1, block = local fun Int.<anonymous>() {
|
||||
result.plusAssign(<this> = $this$with, other = Result(i = 1).plus(<this> = $this$with, other = Result(i = 1)))
|
||||
result.minusAssign(<this> = $this$with, other = Result(i = 1).minus(<this> = $this$with, other = Result(i = 0)))
|
||||
result.timesAssign(<this> = $this$with, other = Result(i = 1).times(<this> = $this$with, other = Result(i = 2)))
|
||||
result.divAssign(<this> = $this$with, other = Result(i = 4).div(<this> = $this$with, other = Result(i = 2)))
|
||||
result.plusAssign(_context_receiver_0 = $this$with, other = Result(i = 1).plus(_context_receiver_0 = $this$with, other = Result(i = 1)))
|
||||
result.minusAssign(_context_receiver_0 = $this$with, other = Result(i = 1).minus(_context_receiver_0 = $this$with, other = Result(i = 0)))
|
||||
result.timesAssign(_context_receiver_0 = $this$with, other = Result(i = 1).times(_context_receiver_0 = $this$with, other = Result(i = 2)))
|
||||
result.divAssign(_context_receiver_0 = $this$with, other = Result(i = 4).div(_context_receiver_0 = $this$with, other = Result(i = 2)))
|
||||
}
|
||||
)
|
||||
return when {
|
||||
|
||||
Reference in New Issue
Block a user