Add Map.getOrDefault method as PlatformDependent declaration with refined signature
- First parameter should have type of K instead of Any - Special bridge should return second parameter if a key has wrong type - Special bridge may throw an exception if defaultValue has wrong type #KT-13209 Fixed
This commit is contained in:
@@ -103,6 +103,7 @@ public interface Map</*0*/ K, /*1*/ out V> {
|
||||
public abstract fun containsKey(/*0*/ key: K): kotlin.Boolean
|
||||
public abstract fun containsValue(/*0*/ value: @kotlin.UnsafeVariance() V): kotlin.Boolean
|
||||
public abstract operator fun get(/*0*/ key: K): V?
|
||||
@kotlin.internal.PlatformDependent() public open fun getOrDefault(/*0*/ key: K, /*1*/ defaultValue: @kotlin.UnsafeVariance() V): V
|
||||
public abstract fun isEmpty(): kotlin.Boolean
|
||||
|
||||
public interface Entry</*0*/ out K, /*1*/ out V> {
|
||||
@@ -188,6 +189,7 @@ public interface MutableMap</*0*/ K, /*1*/ V> : kotlin.collections.Map<K, V> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: K): kotlin.Boolean
|
||||
public abstract override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: V): kotlin.Boolean
|
||||
public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ key: K): V?
|
||||
@kotlin.internal.PlatformDependent() public open override /*1*/ /*fake_override*/ fun getOrDefault(/*0*/ key: K, /*1*/ defaultValue: V): V
|
||||
public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean
|
||||
public abstract fun put(/*0*/ key: K, /*1*/ value: V): V?
|
||||
public abstract fun putAll(/*0*/ from: kotlin.collections.Map<out K, V>): kotlin.Unit
|
||||
|
||||
Reference in New Issue
Block a user