Make unchecked cast in Map.getOrDefault extension that is covariant by K, since getOrDefault member now requires K as key.
Relates to #KT-13209.
This commit is contained in:
@@ -9,7 +9,7 @@ package kotlin.collections
|
||||
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun <@kotlin.internal.OnlyInputTypes K, V> Map<out K, V>.getOrDefault(key: K, defaultValue: V): V
|
||||
= getOrDefault(key, defaultValue)
|
||||
= (this as Map<K, V>).getOrDefault(key, defaultValue)
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user