From 377988cb7bba50ce0550df43f1086654b830b5ad Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Mon, 22 Dec 2014 22:22:33 +0300 Subject: [PATCH] toSortedMap() without comparator requires non-null keys #KT-6509 Fixed --- libraries/stdlib/src/kotlin/collections/MapsJVM.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/stdlib/src/kotlin/collections/MapsJVM.kt b/libraries/stdlib/src/kotlin/collections/MapsJVM.kt index 41fad88f2bd..33f01fd967d 100644 --- a/libraries/stdlib/src/kotlin/collections/MapsJVM.kt +++ b/libraries/stdlib/src/kotlin/collections/MapsJVM.kt @@ -15,7 +15,7 @@ public fun MutableMap.set(key: K, value: V): V? = put(key, value) * * @includeFunctionBody ../../test/collections/MapTest.kt toSortedMap */ -public fun Map.toSortedMap(): SortedMap = TreeMap(this) +public fun Map.toSortedMap(): SortedMap = TreeMap(this) /** * Converts this [[Map]] to a [[SortedMap]] using the given *comparator* so that iteration order will be in the order