From 393025f2b576f6706312de9eafb2d21315899e0e Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Thu, 4 Jun 2020 03:36:50 +0300 Subject: [PATCH] Make Comparator fun interface Remove SAM-constructor-like function, it is no longer needed. (cherry picked from commit d76e8f20752fdd75d1e7b0db05019c8516a74ba6) --- runtime/src/main/kotlin/kotlin/Comparator.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/runtime/src/main/kotlin/kotlin/Comparator.kt b/runtime/src/main/kotlin/kotlin/Comparator.kt index 1b26c10a505..32e0b73e9a6 100644 --- a/runtime/src/main/kotlin/kotlin/Comparator.kt +++ b/runtime/src/main/kotlin/kotlin/Comparator.kt @@ -5,12 +5,6 @@ package kotlin -actual public interface Comparator { - actual fun compare(a: T, b: T): Int +public actual fun interface Comparator { + public actual fun compare(a: T, b: T): Int } - -actual public inline fun Comparator(crossinline comparison: (a: T, b: T) -> Int): Comparator { - return object: Comparator { - override fun compare(a: T, b: T) = comparison(a, b) - } -} \ No newline at end of file