aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/model')
-rw-r--r--core/src/main/kotlin/model/properties/PropertyContainer.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/kotlin/model/properties/PropertyContainer.kt b/core/src/main/kotlin/model/properties/PropertyContainer.kt
index 6009bfe0..b14a30f5 100644
--- a/core/src/main/kotlin/model/properties/PropertyContainer.kt
+++ b/core/src/main/kotlin/model/properties/PropertyContainer.kt
@@ -26,6 +26,7 @@ class PropertyContainer<C : Any> internal constructor(
operator fun <D: Any> PropertyContainer<D>.plus(prop: ExtraProperty<D>?): PropertyContainer<D> =
if (prop == null) this else PropertyContainer(map + (prop.key to prop))
+
interface WithExtraProperties<C : Any> {
val extra: PropertyContainer<C>
@@ -57,4 +58,4 @@ fun <C> C.mergeExtras(left: C, right: C): C where C : Any, C : WithExtraProperti
val newExtras = PropertyContainer((unambiguous.flatten() + replaces).associateBy { it.key })
return needingFullMerge.fold(withNewExtras(newExtras)) { acc, merger -> merger(acc, left, right) }
-} \ No newline at end of file
+}