Review fixes: special case of toMap for singleton map.

#KT-9108
This commit is contained in:
Ilya Gorbunov
2016-08-09 01:42:41 +03:00
parent efc8f2c88a
commit e35a214eaf
3 changed files with 18 additions and 5 deletions
+3 -1
View File
@@ -92,7 +92,9 @@ internal fun <T> arrayPlusCollection(array: dynamic, collection: Collection<T>):
}
// no singleton map implementation in js, return map as is
internal inline fun <K, V> Map<K, V>.toSingletonMap(): Map<K, V> = this
internal inline fun <K, V> Map<K, V>.toSingletonMapOrSelf(): Map<K, V> = this
internal inline fun <K, V> Map<out K, V>.toSingletonMap(): Map<K, V> = this.toMutableMap()
internal inline fun <T> Array<out T>.copyToArrayOfAny(isVarargs: Boolean): Array<out Any?> =
if (isVarargs)