Fix type arguments mapping
This commit is contained in:
+1
-1
@@ -2,5 +2,5 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
fun <K, V> Map<out K, V>.plus(pair: Pair<K, V>): Map<K, V> =
|
||||
fun <K1, V1> Map<out K1, V1>.plus(pair: Pair<K1, V1>): Map<K1, V1> =
|
||||
if (this.isEmpty()) mapOf(pair) else LinkedHashMap(this).apply { put(pair.first, pair.second) }
|
||||
+29
-30
@@ -1,43 +1,42 @@
|
||||
FILE fqName:<root> fileName:/builtinMap.kt
|
||||
FUN name:plus visibility:public modality:FINAL <K, V> ($receiver:kotlin.collections.Map<out K, V>, pair:kotlin.Pair<K, V>) returnType:Map<K, V> flags:
|
||||
TYPE_PARAMETER name:K index:0 variance: upperBounds:[kotlin.Any?]
|
||||
FUN name:plus visibility:public modality:FINAL <K1, V1> ($receiver:kotlin.collections.Map<out K1, V1>, pair:kotlin.Pair<K1, V1>) returnType:Map<K1, V1> flags:
|
||||
TYPE_PARAMETER name:K1 index:0 variance: upperBounds:[kotlin.Any?]
|
||||
superClassifiers:
|
||||
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
|
||||
TYPE_PARAMETER name:V index:1 variance: upperBounds:[kotlin.Any?]
|
||||
TYPE_PARAMETER name:V1 index:1 variance: upperBounds:[kotlin.Any?]
|
||||
superClassifiers:
|
||||
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.collections.Map<out K, V> flags:
|
||||
VALUE_PARAMETER name:pair index:0 type:kotlin.Pair<K, V> flags:
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.collections.Map<out K1, V1> flags:
|
||||
VALUE_PARAMETER name:pair index:0 type:kotlin.Pair<K1, V1> flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='plus(Pair<K, V>) on Map<out K, V>: Map<K, V>'
|
||||
WHEN type=kotlin.collections.Map<K, V> origin=null
|
||||
RETURN type=kotlin.Nothing from='plus(Pair<K1, V1>) on Map<out K1, V1>: Map<K1, V1>'
|
||||
WHEN type=kotlin.collections.Map<K1, V1> origin=null
|
||||
BRANCH
|
||||
if: CALL 'isEmpty(): Boolean' type=kotlin.Boolean origin=null
|
||||
$this: GET_VAR 'this@plus: Map<out K, V>' type=kotlin.collections.Map<out K, V> origin=null
|
||||
then: CALL 'mapOf(Pair<K, V>): Map<K, V>' type=kotlin.collections.Map<K, V> origin=null
|
||||
<K>: K
|
||||
<V>: V
|
||||
pair: GET_VAR 'value-parameter pair: Pair<K, V>' type=kotlin.Pair<K, V> origin=null
|
||||
$this: GET_VAR 'this@plus: Map<out K1, V1>' type=kotlin.collections.Map<out K1, V1> origin=null
|
||||
then: CALL 'mapOf(Pair<K1, V1>): Map<K1, V1>' type=kotlin.collections.Map<K1, V1> origin=null
|
||||
<K>: K1
|
||||
<V>: V1
|
||||
pair: GET_VAR 'value-parameter pair: Pair<K1, V1>' type=kotlin.Pair<K1, V1> origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CALL 'apply(LinkedHashMap<K!, V!> /* = LinkedHashMap<K!, V!> */.() -> Unit) on LinkedHashMap<K!, V!> /* = LinkedHashMap<K!, V!> */: LinkedHashMap<K!, V!> /* = LinkedHashMap<K!, V!> */' type=kotlin.collections.LinkedHashMap<K!, V!> /* = java.util.LinkedHashMap<K!, V!> */ origin=null
|
||||
<T>: LinkedHashMap<K!, V!> /* = LinkedHashMap<K!, V!> */
|
||||
$receiver: CALL 'constructor LinkedHashMap((MutableMap<out K!, out V!>..Map<out K!, V!>?))' type=java.util.LinkedHashMap<K!, V!> origin=null
|
||||
<K : Any!>: null
|
||||
<V : Any!>: null
|
||||
p0: GET_VAR 'this@plus: Map<out K, V>' type=kotlin.collections.Map<out K, V> origin=null
|
||||
block: BLOCK type=kotlin.collections.LinkedHashMap<K!, V!> /* = java.util.LinkedHashMap<K!, V!> */.() -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.collections.LinkedHashMap<K!, V!> /* = java.util.LinkedHashMap<K!, V!> */) returnType:Unit flags:
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.collections.LinkedHashMap<K!, V!> /* = java.util.LinkedHashMap<K!, V!> */ flags:
|
||||
then: CALL 'apply(LinkedHashMap<K1!, V1!> /* = LinkedHashMap<K1!, V1!> */.() -> Unit) on LinkedHashMap<K1!, V1!> /* = LinkedHashMap<K1!, V1!> */: LinkedHashMap<K1!, V1!> /* = LinkedHashMap<K1!, V1!> */' type=kotlin.collections.LinkedHashMap<K1!, V1!> /* = java.util.LinkedHashMap<K1!, V1!> */ origin=null
|
||||
<T>: LinkedHashMap<K1!, V1!> /* = LinkedHashMap<K1!, V1!> */
|
||||
$receiver: CALL 'constructor LinkedHashMap((MutableMap<out K1!, out V1!>..Map<out K1!, V1!>?))' type=java.util.LinkedHashMap<K1!, V1!> origin=null
|
||||
<K : Any!>: K1!
|
||||
<V : Any!>: V1!
|
||||
p0: GET_VAR 'this@plus: Map<out K1, V1>' type=kotlin.collections.Map<out K1, V1> origin=null
|
||||
block: BLOCK type=kotlin.collections.LinkedHashMap<K1!, V1!> /* = java.util.LinkedHashMap<K1!, V1!> */.() -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.collections.LinkedHashMap<K1!, V1!> /* = java.util.LinkedHashMap<K1!, V1!> */) returnType:Unit flags:
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.collections.LinkedHashMap<K1!, V1!> /* = java.util.LinkedHashMap<K1!, V1!> */ flags:
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>() on LinkedHashMap<K!, V!> /* = LinkedHashMap<K!, V!> */: Unit'
|
||||
RETURN type=kotlin.Nothing from='<anonymous>() on LinkedHashMap<K1!, V1!> /* = LinkedHashMap<K1!, V1!> */: Unit'
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
|
||||
CALL 'put(K!, V!): V?' type=V? origin=null
|
||||
$this: GET_VAR 'this@<anonymous>: LinkedHashMap<(K..K?), (V..V?)>' type=kotlin.collections.LinkedHashMap<K!, V!> /* = java.util.LinkedHashMap<K!, V!> */ origin=null
|
||||
key: CALL '<get-first>(): K' type=K origin=GET_PROPERTY
|
||||
$this: GET_VAR 'value-parameter pair: Pair<K, V>' type=kotlin.Pair<K, V> origin=null
|
||||
value: CALL '<get-second>(): V' type=V origin=GET_PROPERTY
|
||||
$this: GET_VAR 'value-parameter pair: Pair<K, V>' type=kotlin.Pair<K, V> origin=null
|
||||
FUNCTION_REFERENCE '<anonymous>() on LinkedHashMap<K!, V!> /* = LinkedHashMap<K!, V!> */: Unit' type=kotlin.collections.LinkedHashMap<K!, V!> /* = java.util.LinkedHashMap<K!, V!> */.() -> kotlin.Unit origin=LAMBDA
|
||||
|
||||
CALL 'put(K1!, V1!): V1?' type=V1? origin=null
|
||||
$this: GET_VAR 'this@<anonymous>: LinkedHashMap<(K1..K1?), (V1..V1?)>' type=kotlin.collections.LinkedHashMap<K1!, V1!> /* = java.util.LinkedHashMap<K1!, V1!> */ origin=null
|
||||
key: CALL '<get-first>(): K1' type=K1 origin=GET_PROPERTY
|
||||
$this: GET_VAR 'value-parameter pair: Pair<K1, V1>' type=kotlin.Pair<K1, V1> origin=null
|
||||
value: CALL '<get-second>(): V1' type=V1 origin=GET_PROPERTY
|
||||
$this: GET_VAR 'value-parameter pair: Pair<K1, V1>' type=kotlin.Pair<K1, V1> origin=null
|
||||
FUNCTION_REFERENCE '<anonymous>() on LinkedHashMap<K1!, V1!> /* = LinkedHashMap<K1!, V1!> */: Unit' type=kotlin.collections.LinkedHashMap<K1!, V1!> /* = java.util.LinkedHashMap<K1!, V1!> */.() -> kotlin.Unit origin=LAMBDA
|
||||
|
||||
Reference in New Issue
Block a user