[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 DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
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 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
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
// MODULE: a
|
||||
// FILE: A.kt
|
||||
|
||||
//class FirstClass : SecondClass()
|
||||
//
|
||||
//open class SecondClass
|
||||
|
||||
class ConfigurationTarget(@ConfigField val target: String)
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class ConfigField()
|
||||
|
||||
// MODULE: b
|
||||
// FILE: B.kt
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class ConfigField()
|
||||
|
||||
class ConfigurationTarget(@ConfigField val target: String)
|
||||
Generated
+6
@@ -555,6 +555,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user