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:
Steven Schäfer
2022-10-04 15:19:30 +02:00
committed by Alexander Udalov
parent 5cf1a88c42
commit 21fef70367
80 changed files with 544 additions and 1728 deletions
@@ -60,14 +60,14 @@ data class Pair<A : Any?, B : Any?> {
}
infix operator fun <T : Any?> T.compareTo(<this>: Comparator<T>, other: T): Int {
return <this>.compare(p0 = <this>, p1 = other)
infix operator fun <T : Any?> T.compareTo(_context_receiver_0: Comparator<T>, other: T): Int {
return _context_receiver_0.compare(p0 = <this>, p1 = other)
}
val <T : Any?> Pair<T, T>.min: T
get(<this>: Comparator<T>): T {
get(_context_receiver_0: Comparator<T>): T {
return when {
less(arg0 = <this>.<get-first>().compareTo<T>(<this> = <this>, other = <this>.<get-second>()), arg1 = 0) -> <this>.<get-first>()
less(arg0 = <this>.<get-first>().compareTo<T>(_context_receiver_0 = _context_receiver_0, other = <this>.<get-second>()), arg1 = 0) -> <this>.<get-first>()
else -> <this>.<get-second>()
}
}
@@ -84,7 +84,7 @@ fun box(): String {
}
/*-> Comparator<String> */
return with<Comparator<String>, String>(receiver = comparator, block = local fun Comparator<String>.<anonymous>(): String {
return Pair<String, String>(first = "OK", second = "fail").<get-min><String>(<this> = $this$with)
return Pair<String, String>(first = "OK", second = "fail").<get-min><String>(_context_receiver_0 = $this$with)
}
)
}