Promote collection builders to stable #KT-47421
This commit is contained in:
committed by
Space
parent
72ab6d5e7e
commit
261d0c2783
@@ -43,7 +43,6 @@ public interface MutableIterable<out T> : Iterable<T> {
|
||||
|
||||
@PublishedApi
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun <E> buildListInternal(builderAction: MutableList<E>.() -> Unit): List<E> {
|
||||
return ArrayList<E>().apply(builderAction).build()
|
||||
@@ -51,7 +50,6 @@ internal actual inline fun <E> buildListInternal(builderAction: MutableList<E>.(
|
||||
|
||||
@PublishedApi
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun <E> buildListInternal(capacity: Int, builderAction: MutableList<E>.() -> Unit): List<E> {
|
||||
return ArrayList<E>(capacity).apply(builderAction).build()
|
||||
|
||||
@@ -7,7 +7,6 @@ package kotlin.collections
|
||||
|
||||
@PublishedApi
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun <K, V> buildMapInternal(builderAction: MutableMap<K, V>.() -> Unit): Map<K, V> {
|
||||
return HashMap<K, V>().apply(builderAction).build()
|
||||
@@ -15,7 +14,6 @@ internal actual inline fun <K, V> buildMapInternal(builderAction: MutableMap<K,
|
||||
|
||||
@PublishedApi
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun <K, V> buildMapInternal(capacity: Int, builderAction: MutableMap<K, V>.() -> Unit): Map<K, V> {
|
||||
return HashMap<K, V>(capacity).apply(builderAction).build()
|
||||
|
||||
@@ -13,7 +13,6 @@ public fun <T> setOf(element: T): Set<T> = hashSetOf(element)
|
||||
|
||||
@PublishedApi
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun <E> buildSetInternal(builderAction: MutableSet<E>.() -> Unit): Set<E> {
|
||||
return HashSet<E>().apply(builderAction).build()
|
||||
@@ -21,7 +20,6 @@ internal actual inline fun <E> buildSetInternal(builderAction: MutableSet<E>.()
|
||||
|
||||
@PublishedApi
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun <E> buildSetInternal(capacity: Int, builderAction: MutableSet<E>.() -> Unit): Set<E> {
|
||||
return HashSet<E>(capacity).apply(builderAction).build()
|
||||
|
||||
Reference in New Issue
Block a user