diff options
author | Kamil Doległo <9080183+kamildoleglo@users.noreply.github.com> | 2021-04-06 15:34:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 15:34:39 +0200 |
commit | 6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d (patch) | |
tree | 978d2cac1d7cd91f322fff2da8186797aadde5b9 /plugins/base/src/main/kotlin/translators/documentables | |
parent | 6756bad5e9d5ebd996275e17bc3ea4f07aea54f4 (diff) | |
download | dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.tar.gz dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.tar.bz2 dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.zip |
Fix some compiler warnings (#1812)
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/documentables')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index 07e52851..c611927c 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -71,7 +71,8 @@ open class DefaultPageCreator( private fun <T> T.toClashedName() where T : Documentable, T : WithExtraProperties<T> = (extra[ClashingDriIdentifier]?.value?.joinToString(", ", "[", "]") { it.displayName } ?: "") + name.orEmpty() - private fun <T> List<T>.renameClashingDocumentable(): List<T> where T : Documentable = + @Suppress("UNCHECKED_CAST") + private fun <T : Documentable> List<T>.renameClashingDocumentable(): List<T> = groupBy { it.dri }.values.flatMap { elements -> if (elements.size == 1) elements else elements.mapNotNull { element -> when (element) { |