A couple of functions in stdlib are marked with @InlineExposed.
This commit is contained in:
committed by
alexander-gorshenev
parent
f959c4e43c
commit
d79875ac7c
@@ -21,6 +21,7 @@ package kotlin.collections
|
||||
* Attempts to read _uninitialized_ values from this array work in implementation-dependent manner,
|
||||
* either throwing exception or returning some kind of implementation-specific default value.
|
||||
*/
|
||||
@kotlin.internal.InlineExposed
|
||||
internal fun <E> arrayOfUninitializedElements(size: Int): Array<E> {
|
||||
// TODO: special case for size == 0?
|
||||
return Array<E>(size)
|
||||
@@ -306,4 +307,4 @@ internal fun <E> Collection<E>.collectionToString(): String {
|
||||
}
|
||||
sb.append("]")
|
||||
return sb.toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ public inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(map: Map<K,
|
||||
putAll(map)
|
||||
}
|
||||
|
||||
// do not expose for now @kotlin.internal.InlineExposed
|
||||
@kotlin.internal.InlineExposed
|
||||
internal fun <K, V> Map<K, V>.optimizeReadOnlyMap() = when (size) {
|
||||
0 -> emptyMap()
|
||||
// 1 -> toSingletonMapOrSelf()
|
||||
|
||||
Reference in New Issue
Block a user