Fix compilation in the case of JDK_16 pointing to JDK 1.8
This commit is contained in:
@@ -11,7 +11,7 @@ package kotlin.collections
|
||||
|
||||
@Deprecated("Use sortWith(comparator) instead.", ReplaceWith("this.sortWith(comparator)"), level = DeprecationLevel.ERROR)
|
||||
@kotlin.internal.InlineOnly
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@Suppress("UNUSED_PARAMETER", "EXTENSION_SHADOWED_BY_MEMBER")
|
||||
public inline fun <T> MutableList<T>.sort(comparator: Comparator<in T>): Unit = throw NotImplementedError()
|
||||
|
||||
@Deprecated("Use sortWith(Comparator(comparison)) instead.", ReplaceWith("this.sortWith(Comparator(comparison))"), level = DeprecationLevel.ERROR)
|
||||
|
||||
@@ -97,7 +97,9 @@ private val KTypeProjection.javaType: Type
|
||||
@ExperimentalStdlibApi
|
||||
private interface TypeImpl : Type {
|
||||
// This is a copy of [Type.getTypeName] which is present on JDK 8+.
|
||||
@Suppress("VIRTUAL_MEMBER_HIDDEN") // This is needed for cases when environment variable JDK_16 points to JDK 8+.
|
||||
@Suppress(
|
||||
"VIRTUAL_MEMBER_HIDDEN", "NON_JVM_DEFAULT_OVERRIDES_JAVA_DEFAULT"
|
||||
) // This is needed for cases when environment variable JDK_16 points to JDK 8+.
|
||||
fun getTypeName(): String
|
||||
}
|
||||
|
||||
|
||||
@@ -291,6 +291,7 @@ public fun <T : Comparable<T>> reverseOrder(): Comparator<T> = @Suppress("UNCHEC
|
||||
*
|
||||
* @sample samples.comparisons.Comparisons.reversed
|
||||
*/
|
||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
|
||||
public fun <T> Comparator<T>.reversed(): Comparator<T> = when (this) {
|
||||
is ReversedComparator -> this.comparator
|
||||
NaturalOrderComparator -> @Suppress("UNCHECKED_CAST") (ReverseOrderComparator as Comparator<T>)
|
||||
|
||||
Reference in New Issue
Block a user