toSortedMap() without comparator requires non-null keys #KT-6509 Fixed

This commit is contained in:
Ilya Ryzhenkov
2014-12-22 22:22:33 +03:00
parent 071eb87f27
commit 377988cb7b
@@ -15,7 +15,7 @@ public fun <K, V> MutableMap<K, V>.set(key: K, value: V): V? = put(key, value)
*
* @includeFunctionBody ../../test/collections/MapTest.kt toSortedMap
*/
public fun <K, V> Map<K, V>.toSortedMap(): SortedMap<K, V> = TreeMap(this)
public fun <K : Any, V> Map<K, V>.toSortedMap(): SortedMap<K, V> = TreeMap(this)
/**
* Converts this [[Map]] to a [[SortedMap]] using the given *comparator* so that iteration order will be in the order