From 93520158b4be59f98015d07e8fecaa7e5a49fd99 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Wed, 20 Jan 2021 10:30:50 +0100 Subject: Bring back displaying jvm name when KaJ is not present (#1702) --- core/src/main/kotlin/model/properties/PropertyContainer.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/src') diff --git a/core/src/main/kotlin/model/properties/PropertyContainer.kt b/core/src/main/kotlin/model/properties/PropertyContainer.kt index 162f1bc8..d217ceee 100644 --- a/core/src/main/kotlin/model/properties/PropertyContainer.kt +++ b/core/src/main/kotlin/model/properties/PropertyContainer.kt @@ -16,6 +16,9 @@ data class PropertyContainer internal constructor( fun addAll(extras: Collection>): PropertyContainer = PropertyContainer(map + extras.map { p -> p.key to p }) + operator fun minus(prop: ExtraProperty.Key): PropertyContainer = + PropertyContainer(map.filterNot { it.key == prop }) + companion object { fun empty(): PropertyContainer = PropertyContainer(emptyMap()) fun withAll(vararg extras: ExtraProperty?) = empty().addAll(extras.filterNotNull()) -- cgit