From 2a76f6df14e3419314e2e087f9ca53d6b5487477 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Thu, 27 Sep 2012 14:34:29 +0400 Subject: [PATCH] Compilation fixed --- libraries/stdlib/src/kotlin/Maps.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/stdlib/src/kotlin/Maps.kt b/libraries/stdlib/src/kotlin/Maps.kt index 7c4e78c516f..c39f084d252 100644 --- a/libraries/stdlib/src/kotlin/Maps.kt +++ b/libraries/stdlib/src/kotlin/Maps.kt @@ -46,7 +46,7 @@ fun Map.Entry.component2() : V { */ public inline fun Map.getOrElse(key: K, defaultValue: ()-> V) : V { if (this.containsKey(key)) { - return this.get(key) + return this.get(key) as V } else { return defaultValue() } @@ -59,7 +59,7 @@ public inline fun Map.getOrElse(key: K, defaultValue: ()-> V) : V { */ public inline fun MutableMap.getOrPut(key: K, defaultValue: ()-> V) : V { if (this.containsKey(key)) { - return this.get(key) + return this.get(key) as V } else { val answer = defaultValue() this.put(key, answer)