From f0742fb7f8a937ef7c2e5a92d6f4a0fd079baa62 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Mon, 25 May 2020 14:40:59 +0200 Subject: Enum constructor values --- core/src/main/kotlin/model/aditionalExtras.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core/src/main/kotlin') diff --git a/core/src/main/kotlin/model/aditionalExtras.kt b/core/src/main/kotlin/model/aditionalExtras.kt index f71852c4..055fc5a6 100644 --- a/core/src/main/kotlin/model/aditionalExtras.kt +++ b/core/src/main/kotlin/model/aditionalExtras.kt @@ -59,4 +59,15 @@ data class ActualTypealias(val underlyingType: SourceSetDependent) : Extr } override val key: ExtraProperty.Key = ActualTypealias +} + +data class ConstructorValues(val values: List) : ExtraProperty{ + companion object : ExtraProperty.Key { + override fun mergeStrategyFor(left: ConstructorValues, right: ConstructorValues) = + MergeStrategy.Fail{ + throw IllegalArgumentException("Merging constructor parameters not applicable") + } + } + + override val key: ExtraProperty.Key = ConstructorValues } \ No newline at end of file -- cgit