diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-06-04 16:44:25 +0200 |
---|---|---|
committer | BarkingBad <32793002+BarkingBad@users.noreply.github.com> | 2020-06-09 10:43:38 +0200 |
commit | 23e0d26139a09c7e2e157d1e0099ceab58d9bb48 (patch) | |
tree | 6770e453866595b6e212c43a9f73bbe9e1b6c78c /core/src/main/kotlin/model/aditionalExtras.kt | |
parent | 435e34fe4d63b85ec8f93155153eda0ea2303d73 (diff) | |
download | dokka-23e0d26139a09c7e2e157d1e0099ceab58d9bb48.tar.gz dokka-23e0d26139a09c7e2e157d1e0099ceab58d9bb48.tar.bz2 dokka-23e0d26139a09c7e2e157d1e0099ceab58d9bb48.zip |
Make enum entry constructor sourceset dependent
Diffstat (limited to 'core/src/main/kotlin/model/aditionalExtras.kt')
-rw-r--r-- | core/src/main/kotlin/model/aditionalExtras.kt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/src/main/kotlin/model/aditionalExtras.kt b/core/src/main/kotlin/model/aditionalExtras.kt index 055fc5a6..1023545d 100644 --- a/core/src/main/kotlin/model/aditionalExtras.kt +++ b/core/src/main/kotlin/model/aditionalExtras.kt @@ -61,12 +61,10 @@ data class ActualTypealias(val underlyingType: SourceSetDependent<Bound>) : Extr override val key: ExtraProperty.Key<DClasslike, ActualTypealias> = ActualTypealias } -data class ConstructorValues(val values: List<String>) : ExtraProperty<DEnumEntry>{ +data class ConstructorValues(val values: SourceSetDependent<List<String>>) : ExtraProperty<DEnumEntry>{ companion object : ExtraProperty.Key<DEnumEntry, ConstructorValues> { override fun mergeStrategyFor(left: ConstructorValues, right: ConstructorValues) = - MergeStrategy.Fail{ - throw IllegalArgumentException("Merging constructor parameters not applicable") - } + MergeStrategy.Replace(ConstructorValues(left.values + right.values)) } override val key: ExtraProperty.Key<DEnumEntry, ConstructorValues> = ConstructorValues |