Fix compilation in the case of JDK_16 pointing to JDK 1.8

This commit is contained in:
Alexander Udalov
2021-01-13 21:47:23 +01:00
parent 3be62dfc89
commit a6b51da308
3 changed files with 5 additions and 2 deletions
@@ -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>)