aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-04-07 20:08:05 +0200
committerKamil Doległo <kamilok1965@interia.pl>2020-04-07 20:08:05 +0200
commit738802c775ef08c74768747e3f8ccaf25087a0d2 (patch)
tree6343710ec443267307bcfc65f3658fef897d2505 /plugins
parent69d189ab28952287cba5e2b24d2ef502959d536c (diff)
downloaddokka-738802c775ef08c74768747e3f8ccaf25087a0d2.tar.gz
dokka-738802c775ef08c74768747e3f8ccaf25087a0d2.tar.bz2
dokka-738802c775ef08c74768747e3f8ccaf25087a0d2.zip
Fix adding `actual typealias` to annotation classes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt6
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt1
2 files changed, 7 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt b/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt
index b3282b03..35f27a94 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/ActualTypealiasAdder.kt
@@ -49,6 +49,12 @@ class ActualTypealiasAdder : PreMergeDocumentableTransformer {
).let(::listOf),
typealiases
)
+ is DAnnotation -> addActualTypeAlias(
+ it.copy(
+ classlikes = addActualTypeAliasToClasslikes(it.classlikes, typealiases)
+ ).let(::listOf),
+ typealiases
+ )
else -> throw IllegalStateException("${it::class.qualifiedName} ${it.name} cannot have extra added")
} as List<DClasslike>
}
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
index ddb5903b..23a67804 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
@@ -139,6 +139,7 @@ fun DClasslike.setPlatformData(platformData: List<PlatformData>): DClasslike = w
is DEnum -> copy(platformData = platformData)
is DInterface -> copy(platformData = platformData)
is DObject -> copy(platformData = platformData)
+ is DAnnotation -> copy(platformData = platformData)
else -> throw IllegalStateException("${this::class.qualifiedName} ${this.name} cannot have platform set")
}