Refactor definition keys

This commit is contained in:
Ilya Chernikov
2018-08-17 13:15:41 +02:00
parent dbee426647
commit ab63d59a56
11 changed files with 100 additions and 126 deletions
@@ -163,7 +163,7 @@ open class PropertiesCollection(val properties: Map<Key<*>, Any> = emptyMap()) {
@JvmName("appendToMap")
fun <K, V> PropertiesCollection.Key<in Map<K, V>>.append(values: Iterable<Pair<K, V>>) {
val newValues = get(this)?.let { it + values } ?: values
val newValues = get(this)?.let { it + values } ?: values.toMap()
data[this] = newValues
}