diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt index 224f42c49b3..a643dc997a5 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt @@ -209,7 +209,9 @@ fun Annotated.getAnnotationRetention(): KotlinRetention? { val retentionArgumentValue = annotations.findAnnotation(KotlinBuiltIns.FQ_NAMES.retention)?.allValueArguments?.get(RETENTION_PARAMETER_NAME) as? EnumValue ?: return null - return KotlinRetention.valueOf(retentionArgumentValue.enumEntryName.asString()) + + val retentionArgumentValueName = retentionArgumentValue.enumEntryName.asString() + return KotlinRetention.values().firstOrNull { it.name == retentionArgumentValueName } } val Annotated.nonSourceAnnotations: List