Files
kotlin-fork/compiler/testData/ir/irText/stubs/builtinMap.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

10 lines
518 B
Plaintext
Vendored

fun <K1 : Any?, V1 : Any?> Map<out K1, V1>.plus(pair: Pair<K1, V1>): Map<K1, V1> {
return when {
<this>.isEmpty() -> mapOf<K1, V1>(pair = pair)
else -> LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>(p0 = <this>).apply<LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>>(block = local fun LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>.<anonymous>() {
$this$apply.put(key = pair.<get-first>(), value = pair.<get-second>()) /*~> Unit */
}
)
}
}