diff options
author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2022-04-28 15:20:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 15:20:43 +0300 |
commit | 4451b8e546584da389da60f73b56ce25d6ac2eaa (patch) | |
tree | fe9c2b8772bad7d8970c85c3144bad0803ca00f6 /plugins/base/src/main/kotlin/translators | |
parent | 2e88c6f70feff1edb9f386110a071df897f3b319 (diff) | |
download | dokka-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.kt | 4 |
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()) } )) ) |