[FIR] Introduce supertypes-for-annotation-class checker
This commit is contained in:
+5
@@ -379,6 +379,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/statusResolveForTypealiasAsSuperClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("supertypesForAnnotationClass.kt")
|
||||
public void testSupertypesForAnnotationClass() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/supertypesForAnnotationClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticsVsNormalProperties.kt")
|
||||
public void testSyntheticsVsNormalProperties() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/syntheticsVsNormalProperties.kt");
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
FILE: supertypesForAnnotationClass.kt
|
||||
public abstract interface SomeInterface : R|kotlin/Any| {
|
||||
}
|
||||
public abstract class SomeClass : R|kotlin/Any| {
|
||||
public constructor(): R|SomeClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann : R|SomeInterface|, R|SomeClass|, R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann2 : R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann2| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann3 : R|kotlin/Annotation|, R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann3| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class MyClass : R|SomeInterface|, R|SomeClass| {
|
||||
public constructor(): R|MyClass| {
|
||||
super<R|SomeClass|>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
interface SomeInterface
|
||||
|
||||
abstract class SomeClass
|
||||
|
||||
annotation class Ann : <!SUPERTYPES_FOR_ANNOTATION_CLASS!>SomeInterface, SomeClass()<!>
|
||||
|
||||
annotation class Ann2
|
||||
|
||||
annotation class Ann3 : <!SUPERTYPES_FOR_ANNOTATION_CLASS!>Annotation<!>
|
||||
|
||||
class MyClass : SomeInterface, SomeClass()
|
||||
+6
@@ -446,6 +446,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/statusResolveForTypealiasAsSuperClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypesForAnnotationClass.kt")
|
||||
public void testSupertypesForAnnotationClass() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/supertypesForAnnotationClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("syntheticsVsNormalProperties.kt")
|
||||
public void testSyntheticsVsNormalProperties() throws Exception {
|
||||
|
||||
+6
@@ -449,6 +449,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/statusResolveForTypealiasAsSuperClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypesForAnnotationClass.kt")
|
||||
public void testSupertypesForAnnotationClass() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/supertypesForAnnotationClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("syntheticsVsNormalProperties.kt")
|
||||
public void testSyntheticsVsNormalProperties() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user