diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/model/Documentable.kt | 5 | ||||
-rw-r--r-- | core/src/main/kotlin/model/aditionalExtras.kt | 18 | ||||
-rw-r--r-- | core/src/main/kotlin/pages/ContentNodes.kt | 5 |
3 files changed, 21 insertions, 7 deletions
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt index 42b49b82..f91383de 100644 --- a/core/src/main/kotlin/model/Documentable.kt +++ b/core/src/main/kotlin/model/Documentable.kt @@ -349,11 +349,12 @@ data class DTypeAlias( override val dri: DRI, override val name: String, override val type: Bound, - val underlyingType: Bound, + val underlyingType: PlatformDependent<Bound>, + override val visibility: PlatformDependent<Visibility>, override val documentation: PlatformDependent<DocumentationNode>, override val platformData: List<PlatformData>, override val extra: PropertyContainer<DTypeAlias> = PropertyContainer.empty() -) : Documentable(), WithType, WithExtraProperties<DTypeAlias> { +) : Documentable(), WithType, WithVisibility, WithExtraProperties<DTypeAlias> { override val children: List<Nothing> get() = emptyList() diff --git a/core/src/main/kotlin/model/aditionalExtras.kt b/core/src/main/kotlin/model/aditionalExtras.kt index af399745..58209939 100644 --- a/core/src/main/kotlin/model/aditionalExtras.kt +++ b/core/src/main/kotlin/model/aditionalExtras.kt @@ -28,8 +28,8 @@ class Annotations(val content: List<Annotation>) : ExtraProperty<Documentable> { override val key: ExtraProperty.Key<Documentable, *> = Annotations data class Annotation(val dri: DRI, val params: Map<String, String>) { - override fun equals(other: Any?): Boolean = when(other) { - is Annotation -> dri.equals(other.dri) + override fun equals(other: Any?): Boolean = when (other) { + is Annotation -> dri == other.dri else -> false } @@ -37,6 +37,18 @@ class Annotations(val content: List<Annotation>) : ExtraProperty<Documentable> { } } -object PrimaryConstructorExtra: ExtraProperty<DFunction>, ExtraProperty.Key<DFunction, PrimaryConstructorExtra> { +object PrimaryConstructorExtra : ExtraProperty<DFunction>, ExtraProperty.Key<DFunction, PrimaryConstructorExtra> { override val key: ExtraProperty.Key<DFunction, *> = this +} + +data class ActualTypealias(val underlyingType: PlatformDependent<Bound>) : ExtraProperty<DClasslike> { + companion object : ExtraProperty.Key<DClasslike, ActualTypealias> { + override fun mergeStrategyFor( + left: ActualTypealias, + right: ActualTypealias + ) = + MergeStrategy.Replace(ActualTypealias(PlatformDependent(left.underlyingType + right.underlyingType))) + } + + override val key: ExtraProperty.Key<DClasslike, ActualTypealias> = ActualTypealias }
\ No newline at end of file diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt index c1792759..61bc3dfc 100644 --- a/core/src/main/kotlin/pages/ContentNodes.kt +++ b/core/src/main/kotlin/pages/ContentNodes.kt @@ -167,10 +167,11 @@ interface Style interface Kind enum class ContentKind : Kind { - Comment, Constructors, Functions, Parameters, Properties, Classlikes, Packages, Symbol, Sample, Main, BriefComment, Empty; + Comment, Constructors, Functions, Parameters, Properties, Classlikes, Packages, Symbol, Sample, Main, BriefComment, + Empty, TypeAliases; companion object{ - private val platformTagged = setOf(Constructors, Functions, Properties, Classlikes, Packages) + private val platformTagged = setOf(Constructors, Functions, Properties, Classlikes, Packages, TypeAliases) fun shouldBePlatformTagged(kind: Kind) : Boolean = kind in platformTagged } |