Deprecate getOrImplicitDefault to make it private later.

This commit is contained in:
Ilya Gorbunov
2016-01-16 15:47:02 +03:00
parent aafd79078f
commit c250921643
@@ -12,6 +12,7 @@ import java.util.*
* *
* @throws NoSuchElementException when the map doesn't contain value for the specified key and no implicit default was provided for that map. * @throws NoSuchElementException when the map doesn't contain value for the specified key and no implicit default was provided for that map.
*/ */
@Deprecated("This function is used to support property delegation to map with defaults and will become internal soon.")
public fun <K, V: Any> Map<K, V>.getOrImplicitDefault(key: K): V { public fun <K, V: Any> Map<K, V>.getOrImplicitDefault(key: K): V {
if (this is MapWithDefault) if (this is MapWithDefault)
return this.getOrImplicitDefault(key) return this.getOrImplicitDefault(key)
@@ -20,7 +21,7 @@ public fun <K, V: Any> Map<K, V>.getOrImplicitDefault(key: K): V {
} }
@kotlin.jvm.JvmName("getOrImplicitDefaultNullable") @kotlin.jvm.JvmName("getOrImplicitDefaultNullable")
@Deprecated("This function will change its behavior soon not to distinguish missing keys and keys mapped to nulls.") @Deprecated("This function is used to support property delegation to map with defaults and will become internal soon.")
public fun <K, V> Map<K, V>.getOrImplicitDefault(key: K): V { public fun <K, V> Map<K, V>.getOrImplicitDefault(key: K): V {
if (this is MapWithDefault) if (this is MapWithDefault)
return this.getOrImplicitDefault(key) return this.getOrImplicitDefault(key)