From 0ff9d95704322117b361f71025b8f11575185a83 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Wed, 19 Sep 2012 15:21:20 +0400 Subject: [PATCH] made Map covariant on second parameter --- compiler/frontend/src/jet/Collections.jet | 2 +- compiler/testData/builtin-classes.txt | 2 +- .../kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/frontend/src/jet/Collections.jet b/compiler/frontend/src/jet/Collections.jet index c7bbbaf1c19..7e26c66cc36 100644 --- a/compiler/frontend/src/jet/Collections.jet +++ b/compiler/frontend/src/jet/Collections.jet @@ -108,7 +108,7 @@ public trait MutableSet : Set, MutableCollection { override fun clear() } -public trait Map { +public trait Map { // Query Operations public fun size() : Int public fun isEmpty() : Boolean diff --git a/compiler/testData/builtin-classes.txt b/compiler/testData/builtin-classes.txt index 33fab318c8e..c02a6468cd5 100644 --- a/compiler/testData/builtin-classes.txt +++ b/compiler/testData/builtin-classes.txt @@ -864,7 +864,7 @@ public final class jet.LongRange : jet.Range, jet.LongIterable { public final val EMPTY: jet.LongRange } } -public abstract trait jet.Map : jet.Any { +public abstract trait jet.Map : jet.Any { public abstract fun containsKey(/*0*/ key: jet.Any?): jet.Boolean public abstract fun containsValue(/*0*/ value: jet.Any?): jet.Boolean public abstract fun entrySet(): jet.Set> diff --git a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt index a064e98adfa..c3fb095a29b 100644 --- a/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt +++ b/libraries/tools/kdoc/src/main/kotlin/org/jetbrains/kotlin/doc/model/KotlinModel.kt @@ -136,14 +136,14 @@ fun inheritedExtensionProperties(properties: Collection): Map): Map> { - val map = TreeMap>() + val map = TreeMap>() functions.filter{ it.extensionClass != null }.groupByTo(map){ it.extensionClass!! } return map } // TODO for some reason the SortedMap causes kotlin to freak out a little :) fun extensionProperties(properties: Collection): Map> { - val map = TreeMap>() + val map = TreeMap>() properties.filter{ it.extensionClass != null }.groupByTo(map){ it.extensionClass!! } return map } @@ -1037,7 +1037,7 @@ class KPackage(model: KModel, val descriptor: NamespaceDescriptor, } fun groupClassMap(): Map> { - return classes.groupByTo(TreeMap>()){it.group} + return classes.groupByTo(TreeMap>()){it.group} } fun packageFunctions() = functions.filter{ it.extensionClass == null }