diff --git a/runtime/src/main/kotlin/kotlin/collections/Maps.kt b/runtime/src/main/kotlin/kotlin/collections/Maps.kt index 1a0a8dd498c..6ac1016d914 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Maps.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Maps.kt @@ -96,8 +96,8 @@ public fun hashMapOf(vararg pairs: Pair): HashMap * * @sample samples.collections.Maps.Instantiation.linkedMapFromPairs */ -//public fun linkedMapOf(vararg pairs: Pair): LinkedHashMap -// = LinkedHashMap(mapCapacity(pairs.size)).apply { putAll(pairs) } +public fun linkedMapOf(vararg pairs: Pair): LinkedHashMap + = LinkedHashMap(mapCapacity(pairs.size)).apply { putAll(pairs) } /** * Calculate the initial capacity of a map, based on Guava's com.google.common.collect.Maps approach. This is equivalent diff --git a/runtime/src/main/kotlin/kotlin/collections/Sets.kt b/runtime/src/main/kotlin/kotlin/collections/Sets.kt index d77bbdc871c..1153802e88e 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Sets.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Sets.kt @@ -58,7 +58,7 @@ public fun hashSetOf(vararg elements: T): HashSet = elements.toCollection * Returns a new [LinkedHashSet] with the given elements. * Elements of the set are iterated in the order they were specified. */ -//public fun linkedSetOf(vararg elements: T): LinkedHashSet = elements.toCollection(LinkedHashSet(mapCapacity(elements.size))) +public fun linkedSetOf(vararg elements: T): LinkedHashSet = elements.toCollection(LinkedHashSet(mapCapacity(elements.size))) /** Returns this Set if it's not `null` and the empty set otherwise. */ @kotlin.internal.InlineOnly