aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/translators
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-04-28 15:20:43 +0300
committerGitHub <noreply@github.com>2022-04-28 15:20:43 +0300
commit4451b8e546584da389da60f73b56ce25d6ac2eaa (patch)
treefe9c2b8772bad7d8970c85c3144bad0803ca00f6 /plugins/base/src/main/kotlin/translators
parent2e88c6f70feff1edb9f386110a071df897f3b319 (diff)
downloaddokka-4451b8e546584da389da60f73b56ce25d6ac2eaa.tar.gz
dokka-4451b8e546584da389da60f73b56ce25d6ac2eaa.tar.bz2
dokka-4451b8e546584da389da60f73b56ce25d6ac2eaa.zip
Make a default value dependent on source set (#2449)
* Make a default value dependent on source set * Get a default value from an expect source set * Fix default value for expect properties * Deprecate `DefaultValue.value` * Add test * Refactor * Reformat
Diffstat (limited to 'plugins/base/src/main/kotlin/translators')
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index 6bc8774d..91848963 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -467,7 +467,7 @@ private class DokkaDescriptorVisitor(
.toAdditionalExtras()).toSet().toSourceSetDependent().toAdditionalModifiers(),
(descriptor.getAnnotationsWithBackingField() + descriptor.fileLevelAnnotations()).toSourceSetDependent()
.toAnnotations(),
- descriptor.getDefaultValue()?.let { DefaultValue(it) },
+ descriptor.getDefaultValue()?.let { DefaultValue(it.toSourceSetDependent()) },
InheritedMember(inheritedFrom.toSourceSetDependent()),
)
)
@@ -712,7 +712,7 @@ private class DokkaDescriptorVisitor(
extra = PropertyContainer.withAll(listOfNotNull(
descriptor.additionalExtras().toSourceSetDependent().toAdditionalModifiers(),
descriptor.getAnnotations().toSourceSetDependent().toAnnotations(),
- descriptor.getDefaultValue()?.let { DefaultValue(it) }
+ descriptor.getDefaultValue()?.let { DefaultValue(it.toSourceSetDependent()) }
))
)