diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index 075c398dd22..0bb930ac266 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -8022,64 +8022,64 @@ public fun CharArray.toSet(): Set { /** * Returns a [SortedSet] of all elements. */ -public fun > Array.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun > Array.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** * Returns a [SortedSet] of all elements. */ -public fun ByteArray.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun ByteArray.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** * Returns a [SortedSet] of all elements. */ -public fun ShortArray.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun ShortArray.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** * Returns a [SortedSet] of all elements. */ -public fun IntArray.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun IntArray.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** * Returns a [SortedSet] of all elements. */ -public fun LongArray.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun LongArray.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** * Returns a [SortedSet] of all elements. */ -public fun FloatArray.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun FloatArray.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** * Returns a [SortedSet] of all elements. */ -public fun DoubleArray.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun DoubleArray.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** * Returns a [SortedSet] of all elements. */ -public fun BooleanArray.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun BooleanArray.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** * Returns a [SortedSet] of all elements. */ -public fun CharArray.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun CharArray.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** @@ -8087,8 +8087,8 @@ public fun CharArray.toSortedSet(): SortedSet { * * Elements in the set returned are sorted according to the given [comparator]. */ -public fun Array.toSortedSet(comparator: Comparator): SortedSet { - return toCollection(TreeSet(comparator)) +public fun Array.toSortedSet(comparator: Comparator): java.util.SortedSet { + return toCollection(java.util.TreeSet(comparator)) } /** diff --git a/libraries/stdlib/src/generated/_Collections.kt b/libraries/stdlib/src/generated/_Collections.kt index 69adf28e996..ff0718f8f9b 100644 --- a/libraries/stdlib/src/generated/_Collections.kt +++ b/libraries/stdlib/src/generated/_Collections.kt @@ -1117,8 +1117,8 @@ public fun Iterable.toSet(): Set { /** * Returns a [SortedSet] of all elements. */ -public fun > Iterable.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun > Iterable.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** @@ -1126,8 +1126,8 @@ public fun > Iterable.toSortedSet(): SortedSet { * * Elements in the set returned are sorted according to the given [comparator]. */ -public fun Iterable.toSortedSet(comparator: Comparator): SortedSet { - return toCollection(TreeSet(comparator)) +public fun Iterable.toSortedSet(comparator: Comparator): java.util.SortedSet { + return toCollection(java.util.TreeSet(comparator)) } /** diff --git a/libraries/stdlib/src/generated/_Sequences.kt b/libraries/stdlib/src/generated/_Sequences.kt index 1ed267b4877..5a07d710035 100644 --- a/libraries/stdlib/src/generated/_Sequences.kt +++ b/libraries/stdlib/src/generated/_Sequences.kt @@ -700,8 +700,8 @@ public fun Sequence.toSet(): Set { * * The operation is _terminal_. */ -public fun > Sequence.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun > Sequence.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** @@ -711,8 +711,8 @@ public fun > Sequence.toSortedSet(): SortedSet { * * The operation is _terminal_. */ -public fun Sequence.toSortedSet(comparator: Comparator): SortedSet { - return toCollection(TreeSet(comparator)) +public fun Sequence.toSortedSet(comparator: Comparator): java.util.SortedSet { + return toCollection(java.util.TreeSet(comparator)) } /** diff --git a/libraries/stdlib/src/generated/_Strings.kt b/libraries/stdlib/src/generated/_Strings.kt index 710f4c95b99..ded8f024ae5 100644 --- a/libraries/stdlib/src/generated/_Strings.kt +++ b/libraries/stdlib/src/generated/_Strings.kt @@ -628,8 +628,8 @@ public fun CharSequence.toSet(): Set { /** * Returns a [SortedSet] of all characters. */ -public fun CharSequence.toSortedSet(): SortedSet { - return toCollection(TreeSet()) +public fun CharSequence.toSortedSet(): java.util.SortedSet { + return toCollection(java.util.TreeSet()) } /** diff --git a/libraries/stdlib/src/kotlin/collections/Sets.kt b/libraries/stdlib/src/kotlin/collections/Sets.kt index aeb16de3052..5cde8060833 100644 --- a/libraries/stdlib/src/kotlin/collections/Sets.kt +++ b/libraries/stdlib/src/kotlin/collections/Sets.kt @@ -91,13 +91,13 @@ public fun setOf(element: T): Set = java.util.Collections.singleton(eleme * Returns a new [SortedSet] with the given elements. */ @JvmVersion -public fun sortedSetOf(vararg elements: T): TreeSet = elements.toCollection(TreeSet()) +public fun sortedSetOf(vararg elements: T): java.util.TreeSet = elements.toCollection(java.util.TreeSet()) /** * Returns a new [SortedSet] with the given [comparator] and elements. */ @JvmVersion -public fun sortedSetOf(comparator: Comparator, vararg elements: T): TreeSet = elements.toCollection(TreeSet(comparator)) +public fun sortedSetOf(comparator: Comparator, vararg elements: T): java.util.TreeSet = elements.toCollection(java.util.TreeSet(comparator)) internal fun Set.optimizeReadOnlySet() = when (size) { diff --git a/libraries/stdlib/src/kotlin/collections/TypeAliases.kt b/libraries/stdlib/src/kotlin/collections/TypeAliases.kt index 4d540b73391..b34b2eff610 100644 --- a/libraries/stdlib/src/kotlin/collections/TypeAliases.kt +++ b/libraries/stdlib/src/kotlin/collections/TypeAliases.kt @@ -11,7 +11,3 @@ package kotlin.collections @SinceKotlin("1.1") public typealias LinkedHashSet = java.util.LinkedHashSet @SinceKotlin("1.1") public typealias HashSet = java.util.HashSet - -// also @SinceKotlin("1.1") -internal typealias SortedSet = java.util.SortedSet -internal typealias TreeSet = java.util.TreeSet \ No newline at end of file diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt index 5f035725b41..0c930379fb0 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt @@ -101,8 +101,8 @@ object Snapshots : TemplateGroupBase() { } builder { typeParam("T: Comparable") doc { "Returns a [SortedSet] of all ${f.element.pluralize()}." } - returns("SortedSet") - body { "return toCollection(TreeSet())" } + returns("java.util.SortedSet") + body { "return toCollection(java.util.TreeSet())" } } val f_toSortedSet_comparator = fn("toSortedSet(comparator: Comparator)") { @@ -116,8 +116,8 @@ object Snapshots : TemplateGroupBase() { Elements in the set returned are sorted according to the given [comparator]. """ } - returns("SortedSet") - body { "return toCollection(TreeSet(comparator))" } + returns("java.util.SortedSet") + body { "return toCollection(java.util.TreeSet(comparator))" } } val f_toMutableList = fn("toMutableList()") {