diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt index 1fed1f9d01e..1f3871e0b9a 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/argumentUtils.kt @@ -97,7 +97,7 @@ fun collectProperties(kClass: KClass, inheritedOnly: Boolean): List properties.removeAll(kClass.declaredMemberProperties) } return properties.filter { - it.visibility == KVisibility.PUBLIC && it.findAnnotation() == null + it.visibility == KVisibility.PUBLIC && (it.annotations.firstOrNull { it is Transient } as Transient?) == null } } diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt index 693c7e0b5d1..e8266b4fe84 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt @@ -63,7 +63,7 @@ fun parseCommandLineArguments(args: List, resu @Suppress("UNCHECKED_CAST") val properties = result::class.memberProperties.mapNotNull { property -> if (property !is KMutableProperty1<*, *>) return@mapNotNull null - val argument = property.findAnnotation() ?: return@mapNotNull null + val argument = property.annotations.firstOrNull { it is Argument } as Argument? ?: return@mapNotNull null ArgumentField(property as KMutableProperty1, argument) }