mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
10 lines
291 B
Kotlin
Vendored
10 lines
291 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// WITH_RUNTIME
|
|
// KJS_WITH_FULL_RUNTIME
|
|
|
|
fun box(): String {
|
|
val list = mutableListOf(3, 2, 4, 8, 1, 5)
|
|
val expected = listOf(8, 5, 4, 3, 2, 1)
|
|
list.sortWith(Comparator { a, b -> b - a })
|
|
return if (list == expected) "OK" else list.toString()
|
|
} |