[FIR] KT-57214: Check the annotations "if possible"
^KT-57214 Fixed Merge-request: KT-MR-9170 Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
854506fa9e
commit
c105e63bbb
+6
@@ -555,6 +555,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/kt57175.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57214.kt")
|
||||
public void testKt57214() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt57214.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("LValueAssignment.kt")
|
||||
public void testLValueAssignment() throws Exception {
|
||||
|
||||
+6
@@ -555,6 +555,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/kt57175.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57214.kt")
|
||||
public void testKt57214() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt57214.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("LValueAssignment.kt")
|
||||
public void testLValueAssignment() throws Exception {
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ fun FirAnnotation.isJvmFieldAnnotation(session: FirSession): Boolean =
|
||||
fun FirAnnotation.useSiteTargetsFromMetaAnnotation(session: FirSession): Set<AnnotationUseSiteTarget> {
|
||||
return toAnnotationClass(session)
|
||||
?.annotations
|
||||
?.find { it.toAnnotationClassId(session) == StandardClassIds.Annotations.Target }
|
||||
?.find { it.toAnnotationClassIdSafe(session) == StandardClassIds.Annotations.Target }
|
||||
?.findUseSiteTargets()
|
||||
?: DEFAULT_USE_SITE_TARGETS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user