diff --git a/core/src/main/kotlin/model/defaultValues.kt b/core/src/main/kotlin/model/defaultValues.kt index 50aaafd818..a118eb4da5 100644 --- a/core/src/main/kotlin/model/defaultValues.kt +++ b/core/src/main/kotlin/model/defaultValues.kt @@ -5,7 +5,7 @@ import org.jetbrains.dokka.model.properties.MergeStrategy class DefaultValue(val expression: SourceSetDependent): ExtraProperty { - @Deprecated("Use `expression` property that depends on source set", ReplaceWith("expression.values.first()")) + @Deprecated("Use `expression` property that depends on source set", ReplaceWith("this.expression.values.first()")) val value: Expression get() = expression.values.first() companion object : ExtraProperty.Key { diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt index 071f6bde21..1f49c1bb72 100644 --- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt +++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt @@ -127,11 +127,10 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog // a default value of parameter can be got from expect source set d.extra[DefaultValue]?.expression?.let { it[sourceSet] ?: if (d is DParameter) it[d.expectPresentInSet] else null + }?.let { expr -> + operator(" = ") + highlightValue(expr) } - ?.let { expr -> - operator(" = ") - highlightValue(expr) - } } private fun regularSignature(c: DClasslike, sourceSet: DokkaSourceSet) = @@ -388,11 +387,14 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog ) { return when (p) { is TypeParameter -> { + if (p.presentableName != null) { + text(p.presentableName!!) + operator(": ") + } annotationsInline(p) link(p.name, p.dri) } is FunctionalTypeConstructor -> { - annotationsInline(p) +funType(mainDRI.single(), mainSourcesetData, p) } is GenericTypeConstructor -> @@ -439,11 +441,11 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog private fun funType(dri: DRI, sourceSets: Set, type: FunctionalTypeConstructor) = contentBuilder.contentFor(dri, sourceSets, ContentKind.Main) { - if (type.presentableName != null) { text(type.presentableName!!) operator(": ") } + annotationsInline(type) if (type.isSuspendable) keyword("suspend ") if (type.isExtensionFunction) {