[SLC] symbolAnnotationsUtils: reuse DEFAULT_VALUE_PARAMETER
^KT-55481
This commit is contained in:
committed by
Space Team
parent
65426f6b40
commit
3c0f3777c6
+4
-1
@@ -190,7 +190,10 @@ private fun KtAnnotationApplication.tryConvertAsRetention(foundAnnotations: Set<
|
|||||||
if (classId != StandardClassIds.Annotations.Retention) return null
|
if (classId != StandardClassIds.Annotations.Retention) return null
|
||||||
if (JvmAnnotationNames.RETENTION_ANNOTATION.asString() in foundAnnotations) return null
|
if (JvmAnnotationNames.RETENTION_ANNOTATION.asString() in foundAnnotations) return null
|
||||||
|
|
||||||
val argumentWithKotlinRetention = arguments.firstOrNull { it.name.asString() == "value" }?.expression as? KtEnumEntryAnnotationValue
|
val argumentWithKotlinRetention = arguments.firstOrNull {
|
||||||
|
it.name == DEFAULT_VALUE_PARAMETER
|
||||||
|
}?.expression as? KtEnumEntryAnnotationValue
|
||||||
|
|
||||||
val kotlinRetentionName = argumentWithKotlinRetention?.callableId?.callableName?.asString()
|
val kotlinRetentionName = argumentWithKotlinRetention?.callableId?.callableName?.asString()
|
||||||
return createRetentionAnnotation(modifierList, kotlinRetentionName)
|
return createRetentionAnnotation(modifierList, kotlinRetentionName)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user