Make Map.plus accept Map out-projected by key type as either operand (receiver or parameter).
#KT-11301 Fixed
This commit is contained in:
@@ -22,10 +22,10 @@ public fun <E> HashSet(c: Collection<E>): HashSet<E>
|
||||
public fun <E> LinkedHashSet(c: Collection<E>): HashSet<E>
|
||||
= LinkedHashSet<E>(c.size).apply { addAll(c) }
|
||||
|
||||
public fun <K, V> HashMap(m: Map<K, V>): HashMap<K, V>
|
||||
public fun <K, V> HashMap(m: Map<out K, V>): HashMap<K, V>
|
||||
= HashMap<K, V>(m.size).apply { putAll(m) }
|
||||
|
||||
public fun <K, V> LinkedHashMap(m: Map<K, V>): LinkedHashMap<K, V>
|
||||
public fun <K, V> LinkedHashMap(m: Map<out K, V>): LinkedHashMap<K, V>
|
||||
= LinkedHashMap<K, V>(m.size).apply { putAll(m) }
|
||||
|
||||
public fun <E> ArrayList(c: Collection<E>): ArrayList<E>
|
||||
|
||||
Reference in New Issue
Block a user