Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
vmishenev committed Apr 28, 2022
1 parent be21885 commit 1d804fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/src/main/kotlin/model/defaultValues.kt
Expand Up @@ -5,7 +5,7 @@ import org.jetbrains.dokka.model.properties.MergeStrategy

class DefaultValue(val expression: SourceSetDependent<Expression>): ExtraProperty<Documentable> {

@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<Documentable, DefaultValue> {
Expand Down
Expand Up @@ -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) =
Expand Down Expand Up @@ -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 ->
Expand Down Expand Up @@ -439,11 +441,11 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog

private fun funType(dri: DRI, sourceSets: Set<DokkaSourceSet>, 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) {
Expand Down

0 comments on commit 1d804fe

Please sign in to comment.