[FIR] Don't check Java annotations for cycles
^KT-64083 fixed
This commit is contained in:
+6
@@ -2016,6 +2016,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithClassArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaAnnotationWithParameter.kt")
|
||||
public void testJavaAnnotationWithParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("JvmSerializableLambdaAnnotation.kt")
|
||||
public void testJvmSerializableLambdaAnnotation() throws Exception {
|
||||
|
||||
+6
@@ -2016,6 +2016,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithClassArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaAnnotationWithParameter.kt")
|
||||
public void testJavaAnnotationWithParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("JvmSerializableLambdaAnnotation.kt")
|
||||
public void testJvmSerializableLambdaAnnotation() throws Exception {
|
||||
|
||||
+6
@@ -2010,6 +2010,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithClassArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaAnnotationWithParameter.kt")
|
||||
public void testJavaAnnotationWithParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("JvmSerializableLambdaAnnotation.kt")
|
||||
public void testJvmSerializableLambdaAnnotation() throws Exception {
|
||||
|
||||
+6
@@ -2016,6 +2016,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithClassArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaAnnotationWithParameter.kt")
|
||||
public void testJavaAnnotationWithParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("JvmSerializableLambdaAnnotation.kt")
|
||||
public void testJvmSerializableLambdaAnnotation() throws Exception {
|
||||
|
||||
+3
@@ -220,6 +220,9 @@ object FirAnnotationClassDeclarationChecker : FirRegularClassChecker() {
|
||||
annotationsWithCycle += ownedAnnotation
|
||||
return true
|
||||
}
|
||||
if (referencedAnnotation.isJavaOrEnhancement) {
|
||||
return false
|
||||
}
|
||||
return annotationHasCycle(referencedAnnotation)
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-64083
|
||||
// FILE: ThreadSafe.java
|
||||
|
||||
public @interface ThreadSafe {
|
||||
String reason() default "";
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
private annotation class AutoFactoryThreadSafe(
|
||||
val threadSafe: ThreadSafe = ThreadSafe()
|
||||
)
|
||||
Generated
+6
@@ -2016,6 +2016,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithClassArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaAnnotationWithParameter.kt")
|
||||
public void testJavaAnnotationWithParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/annotations/javaAnnotationWithParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("JvmSerializableLambdaAnnotation.kt")
|
||||
public void testJvmSerializableLambdaAnnotation() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user