diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/model/Documentable.kt | 3 | ||||
-rw-r--r-- | core/src/main/kotlin/model/additionalExtras.kt | 15 |
2 files changed, 14 insertions, 4 deletions
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt index adc51cfc..c7b2290e 100644 --- a/core/src/main/kotlin/model/Documentable.kt +++ b/core/src/main/kotlin/model/Documentable.kt @@ -376,8 +376,9 @@ data class DTypeAlias( override val expectPresentInSet: DokkaSourceSet?, override val sourceSets: Set<DokkaSourceSet>, override val generics: List<DTypeParameter>, + override val sources: SourceSetDependent<DocumentableSource>, override val extra: PropertyContainer<DTypeAlias> = PropertyContainer.empty() -) : Documentable(), WithType, WithVisibility, WithExtraProperties<DTypeAlias>, WithGenerics { +) : Documentable(), WithType, WithVisibility, WithExtraProperties<DTypeAlias>, WithGenerics, WithSources { override val children: List<Nothing> get() = emptyList() diff --git a/core/src/main/kotlin/model/additionalExtras.kt b/core/src/main/kotlin/model/additionalExtras.kt index 9b98448e..1f6f6d27 100644 --- a/core/src/main/kotlin/model/additionalExtras.kt +++ b/core/src/main/kotlin/model/additionalExtras.kt @@ -104,13 +104,22 @@ object PrimaryConstructorExtra : ExtraProperty<DFunction>, ExtraProperty.Key<DFu override val key: ExtraProperty.Key<DFunction, *> = this } -data class ActualTypealias(val underlyingType: SourceSetDependent<Bound>) : ExtraProperty<DClasslike> { +data class ActualTypealias( + val typeAlias: DTypeAlias +) : ExtraProperty<DClasslike> { + + @Suppress("unused") + @Deprecated(message = "It can be removed soon. Use [typeAlias.underlyingType]", ReplaceWith("this.typeAlias.underlyingType")) + val underlyingType: SourceSetDependent<Bound> + get() = typeAlias.underlyingType + companion object : ExtraProperty.Key<DClasslike, ActualTypealias> { override fun mergeStrategyFor( left: ActualTypealias, right: ActualTypealias - ) = - MergeStrategy.Replace(ActualTypealias(left.underlyingType + right.underlyingType)) + ) = MergeStrategy.Fail { + throw IllegalStateException("Adding [ActualTypealias] should be after merging all documentables") + } } override val key: ExtraProperty.Key<DClasslike, ActualTypealias> = ActualTypealias |