[FIR] KT-57175: Expand typealiases in the annotation class checker

^KT-57175 Fixed
This commit is contained in:
Nikolay Lunyak
2023-03-08 17:12:45 +02:00
committed by Space Team
parent 5cbe699fc4
commit f39467b4ba
6 changed files with 29 additions and 0 deletions
@@ -543,6 +543,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
}
@Test
@TestMetadata("kt57175.kt")
public void testKt57175() throws Exception {
runTest("compiler/testData/diagnostics/tests/kt57175.kt");
}
@Test
@TestMetadata("LValueAssignment.kt")
public void testLValueAssignment() throws Exception {
@@ -543,6 +543,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
}
@Test
@TestMetadata("kt57175.kt")
public void testKt57175() throws Exception {
runTest("compiler/testData/diagnostics/tests/kt57175.kt");
}
@Test
@TestMetadata("LValueAssignment.kt")
public void testLValueAssignment() throws Exception {
@@ -543,6 +543,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
}
@Test
@TestMetadata("kt57175.kt")
public void testKt57175() throws Exception {
runTest("compiler/testData/diagnostics/tests/kt57175.kt");
}
@Test
@TestMetadata("LValueAssignment.kt")
public void testLValueAssignment() throws Exception {
@@ -72,6 +72,7 @@ object FirAnnotationClassDeclarationChecker : FirRegularClassChecker() {
val typeRef = parameter.returnTypeRef
val coneType = typeRef.coneTypeSafe<ConeLookupTagBasedType>()
?.fullyExpandedType(context.session) as? ConeLookupTagBasedType
val classId = coneType?.classId
if (coneType != null) when {
+4
View File
@@ -0,0 +1,4 @@
// FIR_IDENTICAL
typealias Aliased = String
annotation class Tag(val tags: Aliased) // K1: ok, K2: INVALID_TYPE_OF_ANNOTATION_MEMBER
@@ -543,6 +543,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
}
@Test
@TestMetadata("kt57175.kt")
public void testKt57175() throws Exception {
runTest("compiler/testData/diagnostics/tests/kt57175.kt");
}
@Test
@TestMetadata("LValueAssignment.kt")
public void testLValueAssignment() throws Exception {