From 35851c4f00bde0b66ce1d9ae8ca02bab761df819 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Tue, 10 Mar 2020 14:18:11 +0100 Subject: Remove nested packages from packages --- core/src/main/kotlin/model/Documentable.kt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt index d073d39a..8ff5969c 100644 --- a/core/src/main/kotlin/model/Documentable.kt +++ b/core/src/main/kotlin/model/Documentable.kt @@ -59,10 +59,6 @@ interface WithScope { val classlikes: List } -interface WithPackages { - val packages: List -} - interface WithVisibility { val visibility: PlatformDependent } @@ -114,11 +110,11 @@ abstract class Classlike : Documentable(), WithScope, WithVisibility, WithExpect data class Module( override val name: String, - override val packages: List, + val packages: List, override val documentation: PlatformDependent, override val platformData: List, override val extra: PropertyContainer = PropertyContainer.empty() -) : Documentable(), WithPackages, WithExtraProperties { +) : Documentable(), WithExtraProperties { override val dri: DRI = DRI.topLevel override val children: List get() = packages @@ -131,14 +127,13 @@ data class Package( override val functions: List, override val properties: List, override val classlikes: List, - override val packages: List, override val documentation: PlatformDependent, override val platformData: List, override val extra: PropertyContainer = PropertyContainer.empty() -) : Documentable(), WithScope, WithPackages, WithExtraProperties { +) : Documentable(), WithScope, WithExtraProperties { override val name = dri.packageName.orEmpty() override val children: List - get() = (properties + functions + classlikes + packages) as List + get() = (properties + functions + classlikes) as List override fun withNewExtras(newExtras: PropertyContainer) = copy(extra = newExtras) } -- cgit