diff --git a/compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction/K.kt b/compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction/K.kt index 4b7ada578e4..fdc08268557 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction/K.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/functionReferenceErasedToKFunction/K.kt @@ -1,6 +1,6 @@ class K { fun reverse(s: String): String { - return s.reverse() + return s.reversed() } companion object { diff --git a/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions/K.kt b/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions/K.kt index 248f0229e0b..363950df596 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions/K.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions/K.kt @@ -2,9 +2,9 @@ import kotlin.reflect.* import kotlin.test.assertEquals fun box(): String { - assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.members.map { it.name }.toSortedList()) - assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.functions.map { it.name }.toSortedList()) - assertEquals(listOf("member", "staticMethod"), J::class.declaredFunctions.map { it.name }.toSortedList()) + assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.members.map { it.name }.sorted()) + assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.functions.map { it.name }.sorted()) + assertEquals(listOf("member", "staticMethod"), J::class.declaredFunctions.map { it.name }.sorted()) assertEquals(1, J::class.constructors.size()) diff --git a/compiler/testData/codegen/boxWithJava/reflection/nestedClasses/K.kt b/compiler/testData/codegen/boxWithJava/reflection/nestedClasses/K.kt index d3672290a74..5dfe7b77ae5 100644 --- a/compiler/testData/codegen/boxWithJava/reflection/nestedClasses/K.kt +++ b/compiler/testData/codegen/boxWithJava/reflection/nestedClasses/K.kt @@ -1,7 +1,7 @@ import kotlin.test.assertEquals fun box(): String { - assertEquals(listOf("Inner", "Nested", "PrivateNested"), J::class.nestedClasses.map { it.simpleName!! }.toSortedList()) + assertEquals(listOf("Inner", "Nested", "PrivateNested"), J::class.nestedClasses.map { it.simpleName!! }.sorted()) return "OK" } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/annotations/simpleConstructorAnnotation.kt b/compiler/testData/codegen/boxWithStdlib/reflection/annotations/simpleConstructorAnnotation.kt index c189d554f89..e2935a3d9dd 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/annotations/simpleConstructorAnnotation.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/annotations/simpleConstructorAnnotation.kt @@ -7,7 +7,7 @@ class C @Primary constructor() { } fun box(): String { - val ans = C::class.constructors.map { it.annotations.single().annotationType().simpleName }.toSortedList() + val ans = C::class.constructors.map { it.annotations.single().annotationType().simpleName }.sorted() if (ans != listOf("Primary", "Secondary")) return "Fail: $ans" return "OK" } diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/classes/nestedClasses.kt b/compiler/testData/codegen/boxWithStdlib/reflection/classes/nestedClasses.kt index 0e70d36541e..1b4d048271c 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/classes/nestedClasses.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/classes/nestedClasses.kt @@ -11,7 +11,7 @@ class A { private class PrivateNested } -fun nestedNames(c: KClass<*>) = c.nestedClasses.map { it.simpleName ?: throw AssertionError("Unnamed class: ${it.java}") }.toSortedList() +fun nestedNames(c: KClass<*>) = c.nestedClasses.map { it.simpleName ?: throw AssertionError("Unnamed class: ${it.java}") }.sorted() fun box(): String { // Kotlin class without nested classes diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/functions/simpleGetFunctions.kt b/compiler/testData/codegen/boxWithStdlib/reflection/functions/simpleGetFunctions.kt index 80658d4b2ab..f3a8415c73e 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/functions/simpleGetFunctions.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/functions/simpleGetFunctions.kt @@ -8,13 +8,13 @@ open class A { class B : A() fun box(): String { - val all = A::class.functions.map { it.name }.toSortedList() + val all = A::class.functions.map { it.name }.sorted() assert(all == listOf("equals", "hashCode", "mem", "memExt", "toString")) { "Fail A functions: ${A::class.functions}" } - val declared = A::class.declaredFunctions.map { it.name }.toSortedList() + val declared = A::class.declaredFunctions.map { it.name }.sorted() assert(declared == listOf("mem", "memExt")) { "Fail A declaredFunctions: ${A::class.declaredFunctions}" } - val declaredSubclass = B::class.declaredFunctions.map { it.name }.toSortedList() + val declaredSubclass = B::class.declaredFunctions.map { it.name }.sorted() assert(declaredSubclass.isEmpty()) { "Fail B declaredFunctions: ${B::class.declaredFunctions}" } return "OK" diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/properties/allVsDeclared.kt b/compiler/testData/codegen/boxWithStdlib/reflection/properties/allVsDeclared.kt index ab2b6c06956..3f7a0bc2033 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/properties/allVsDeclared.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/properties/allVsDeclared.kt @@ -14,8 +14,8 @@ class Sub : Super() { fun box(): String { val sub = Sub::class - assertEquals(listOf("a", "c"), sub.memberProperties.map { it.name }.sort()) - assertEquals(listOf("b", "d"), sub.memberExtensionProperties.map { it.name }.sort()) + assertEquals(listOf("a", "c"), sub.memberProperties.map { it.name }.sorted()) + assertEquals(listOf("b", "d"), sub.memberExtensionProperties.map { it.name }.sorted()) assertEquals(listOf("c"), sub.declaredMemberProperties.map { it.name }) assertEquals(listOf("d"), sub.declaredMemberExtensionProperties.map { it.name }) diff --git a/compiler/testData/codegen/boxWithStdlib/reflection/properties/simpleGetProperties.kt b/compiler/testData/codegen/boxWithStdlib/reflection/properties/simpleGetProperties.kt index f4866eebc46..bfa6925bb3d 100644 --- a/compiler/testData/codegen/boxWithStdlib/reflection/properties/simpleGetProperties.kt +++ b/compiler/testData/codegen/boxWithStdlib/reflection/properties/simpleGetProperties.kt @@ -15,7 +15,7 @@ fun box(): String { val props = klass.memberProperties - val names = props.map { it.name }.toSortedList() + val names = props.map { it.name }.sorted() assert(names == listOf("anyVar", "int", "string")) { "Fail names: $props" } val stringProp = props.firstOrNull { it.name == "string" } ?: return "Fail, string not found: $props" diff --git a/compiler/testData/codegen/boxWithStdlib/regressions/kt2017.kt b/compiler/testData/codegen/boxWithStdlib/regressions/kt2017.kt index 86c3392ecbd..a48430c1bf6 100644 --- a/compiler/testData/codegen/boxWithStdlib/regressions/kt2017.kt +++ b/compiler/testData/codegen/boxWithStdlib/regressions/kt2017.kt @@ -1,4 +1,4 @@ fun box(): String { - val sorted = arrayListOf("1", "3", "2").sort() + val sorted = arrayListOf("1", "3", "2").sorted() return if (sorted != arrayListOf("1", "2", "3")) "$sorted" else "OK" } \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/regressions/kt6434.kt b/compiler/testData/codegen/boxWithStdlib/regressions/kt6434.kt index 85f9a4b9ab9..5ae625cacb7 100644 --- a/compiler/testData/codegen/boxWithStdlib/regressions/kt6434.kt +++ b/compiler/testData/codegen/boxWithStdlib/regressions/kt6434.kt @@ -23,6 +23,6 @@ class C(val nums: Map) { } fun box(): String { - val res = C(hashMapOf(E.VALUE to 11, E.VALUE2 to 12)).normalizedNums.values().sort().joinToString() + val res = C(hashMapOf(E.VALUE to 11, E.VALUE2 to 12)).normalizedNums.values().sorted().joinToString() return if ("0.0, 1.0" == res) "OK" else "fail $res" } \ No newline at end of file