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
@@ -60,14 +60,14 @@ data class Pair<A : Any?, B : Any?> {
}
infix operator fun <T : Any?> T.compareTo(_context_receiver_0: Comparator<T>, other: T): Int {
return _context_receiver_0.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(_context_receiver_0: Comparator<T>): T {
get($context_receiver_0: Comparator<T>): T {
return when {
less(arg0 = <this>.<get-first>().compareTo<T>(_context_receiver_0 = _context_receiver_0, 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>(_context_receiver_0 = $this$with)
return Pair<String, String>(first = "OK", second = "fail").<get-min><String>($context_receiver_0 = $this$with)
}
)
}