[FE, IR] Check annotations on expect and actual enum entries

^KT-60668
^KT-60936
This commit is contained in:
Roman Efremov
2023-08-17 17:34:23 +02:00
committed by Space Team
parent b57940a59b
commit def4388c19
10 changed files with 89 additions and 1 deletions
@@ -758,6 +758,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/differentOrder.kt");
}
@Test
@TestMetadata("enumEntries.kt")
public void testEnumEntries() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/enumEntries.kt");
}
@Test
@TestMetadata("fakeOverrides.kt")
public void testFakeOverrides() throws Exception {
@@ -758,6 +758,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/differentOrder.kt");
}
@Test
@TestMetadata("enumEntries.kt")
public void testEnumEntries() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/enumEntries.kt");
}
@Test
@TestMetadata("fakeOverrides.kt")
public void testFakeOverrides() throws Exception {
@@ -238,6 +238,10 @@ class FirExpectActualMatchingContextImpl private constructor(
return asSymbol().fir.collectEnumEntries().map { it.name }
}
override fun RegularClassSymbolMarker.collectEnumEntries(): List<DeclarationSymbolMarker> {
return asSymbol().fir.collectEnumEntries().map { it.symbol }
}
override val CallableSymbolMarker.dispatchReceiverType: SimpleTypeMarker?
get() = asSymbol().dispatchReceiverType
override val CallableSymbolMarker.extensionReceiverType: KotlinTypeMarker?