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()
|
}.flatten().toSet()
|
||||||
val annotationTargetValueNames = AnnotationTarget.values().map { it.name }
|
val annotationTargetValueNames = AnnotationTarget.values().map { it.name }
|
||||||
return (requiredTargets + otherReferenceRequiredTargets).asSequence().distinct().filter { it.name in annotationTargetValueNames }
|
return (requiredTargets + otherReferenceRequiredTargets).asSequence().distinct().filter { it.name in annotationTargetValueNames }
|
||||||
.toList()
|
.toList().sorted()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getActualTargetList(annotated: PsiTarget): AnnotationChecker.Companion.TargetList {
|
private fun getActualTargetList(annotated: PsiTarget): AnnotationChecker.Companion.TargetList {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// "Add annotation target" "true"
|
// "Add annotation target" "true"
|
||||||
|
|
||||||
@Target(AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE)
|
||||||
annotation class Foo
|
annotation class Foo
|
||||||
|
|
||||||
@Foo
|
@Foo
|
||||||
|
|||||||
Reference in New Issue
Block a user