mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-04 08:31:30 +00:00
Stable order of generated annotation targets
A random order of usages is enabled in 193 platform that makes tests flaky without the commit.
This commit is contained in:
@@ -93,7 +93,7 @@ private fun KtAnnotationEntry.getRequiredAnnotationTargets(annotationClass: KtCl
|
||||
}.flatten().toSet()
|
||||
val annotationTargetValueNames = AnnotationTarget.values().map { it.name }
|
||||
return (requiredTargets + otherReferenceRequiredTargets).asSequence().distinct().filter { it.name in annotationTargetValueNames }
|
||||
.toList()
|
||||
.toList().sorted()
|
||||
}
|
||||
|
||||
private fun getActualTargetList(annotated: PsiTarget): AnnotationChecker.Companion.TargetList {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Add annotation target" "true"
|
||||
|
||||
@Target(AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE)
|
||||
annotation class Foo
|
||||
|
||||
@Foo
|
||||
|
||||
Reference in New Issue
Block a user