[FIR] Store matched actual class members inside FIR attribute
Currently, there is only attribute `ExpectForActualAttributeKey` where mapping is stored only for source declarations with `actual` modifier. But we need mapping of all class members, including classes which were actualized via `actual typealias` or fake override members. This data will be needed for the annotation checker in subsequent commits. ^KT-60668 ^KT-60936
This commit is contained in:
committed by
Space Team
parent
2f00ed3ed7
commit
8aa3ccd342
+6
@@ -33711,6 +33711,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
|
||||
+6
@@ -33711,6 +33711,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ interface FirExpectActualMatchingContext : ExpectActualMatchingContext<FirBasedS
|
||||
}
|
||||
|
||||
interface FirExpectActualMatchingContextFactory : FirSessionComponent {
|
||||
fun create(session: FirSession, scopeSession: ScopeSession): FirExpectActualMatchingContext
|
||||
fun create(
|
||||
session: FirSession,
|
||||
scopeSession: ScopeSession,
|
||||
allowedWritingMemberExpectForActualMapping: Boolean = false,
|
||||
): FirExpectActualMatchingContext
|
||||
}
|
||||
|
||||
val FirSession.expectActualMatchingContextFactory: FirExpectActualMatchingContextFactory by FirSession.sessionComponentAccessor()
|
||||
+4
-5
@@ -6,17 +6,13 @@
|
||||
package org.jetbrains.kotlin.fir.resolve.transformers.mpp
|
||||
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirPrimaryConstructor
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.isActual
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.isInline
|
||||
import org.jetbrains.kotlin.fir.expectActualMatchingContextFactory
|
||||
import org.jetbrains.kotlin.fir.expressions.FirStatement
|
||||
import org.jetbrains.kotlin.fir.languageVersionSettings
|
||||
import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.getContainingClass
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.FirAbstractTreeTransformer
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.FirTransformerBasedResolveProcessor
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
@@ -40,7 +36,10 @@ open class FirExpectActualMatcherTransformer(
|
||||
private val scopeSession: ScopeSession,
|
||||
) : FirAbstractTreeTransformer<Nothing?>(FirResolvePhase.EXPECT_ACTUAL_MATCHING) {
|
||||
|
||||
private val expectActualMatchingContext = session.expectActualMatchingContextFactory.create(session, scopeSession)
|
||||
private val expectActualMatchingContext = session.expectActualMatchingContextFactory.create(
|
||||
session, scopeSession,
|
||||
allowedWritingMemberExpectForActualMapping = true,
|
||||
)
|
||||
|
||||
// --------------------------- classifiers ---------------------------
|
||||
override fun transformTypeAlias(typeAlias: FirTypeAlias, data: Nothing?): FirStatement {
|
||||
|
||||
+69
-4
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotation
|
||||
import org.jetbrains.kotlin.fir.expressions.FirConstExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.isOverride
|
||||
import org.jetbrains.kotlin.fir.resolve.*
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.scopes.*
|
||||
@@ -28,6 +27,7 @@ import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.calls.mpp.ExpectActualCollectionArgumentsCompatibilityCheckStrategy
|
||||
import org.jetbrains.kotlin.resolve.calls.mpp.ExpectActualMatchingContext.AnnotationCallInfo
|
||||
import org.jetbrains.kotlin.resolve.checkers.OptInNames
|
||||
import org.jetbrains.kotlin.resolve.multiplatform.ExpectActualCompatibility
|
||||
import org.jetbrains.kotlin.types.AbstractTypeChecker
|
||||
import org.jetbrains.kotlin.types.TypeCheckerState
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
@@ -40,7 +40,8 @@ import org.jetbrains.kotlin.utils.addToStdlib.castAll
|
||||
|
||||
class FirExpectActualMatchingContextImpl private constructor(
|
||||
private val actualSession: FirSession,
|
||||
private val scopeSession: ScopeSession
|
||||
private val scopeSession: ScopeSession,
|
||||
private val allowedWritingMemberExpectForActualMapping: Boolean,
|
||||
) : FirExpectActualMatchingContext, TypeSystemContext by actualSession.typeContext {
|
||||
override val shouldCheckReturnTypesOfCallables: Boolean
|
||||
get() = false
|
||||
@@ -396,8 +397,72 @@ class FirExpectActualMatchingContextImpl private constructor(
|
||||
return symbol.source == null && symbol.origin !is FirDeclarationOrigin.Plugin
|
||||
}
|
||||
|
||||
override fun onMatchedMembers(
|
||||
expectSymbol: DeclarationSymbolMarker,
|
||||
actualSymbol: DeclarationSymbolMarker,
|
||||
containingExpectClassSymbol: RegularClassSymbolMarker?,
|
||||
containingActualClassSymbol: RegularClassSymbolMarker?
|
||||
) {
|
||||
if (containingActualClassSymbol == null || containingExpectClassSymbol == null) return
|
||||
|
||||
containingActualClassSymbol.asSymbol().addMemberExpectForActualMapping(
|
||||
expectSymbol.asSymbol(),
|
||||
actualSymbol.asSymbol(),
|
||||
containingExpectClassSymbol.asSymbol(),
|
||||
ExpectActualCompatibility.Compatible
|
||||
)
|
||||
}
|
||||
|
||||
override fun onMismatchedMembersFromClassScope(
|
||||
expectSymbol: DeclarationSymbolMarker,
|
||||
actualSymbolsByIncompatibility: Map<ExpectActualCompatibility.Incompatible<*>, List<DeclarationSymbolMarker>>,
|
||||
containingExpectClassSymbol: RegularClassSymbolMarker?,
|
||||
containingActualClassSymbol: RegularClassSymbolMarker?
|
||||
) {
|
||||
if (containingExpectClassSymbol == null || containingActualClassSymbol == null) return
|
||||
|
||||
for ((incompatibility, actualSymbols) in actualSymbolsByIncompatibility.entries) {
|
||||
for (actualSymbol in actualSymbols) {
|
||||
containingActualClassSymbol.asSymbol().addMemberExpectForActualMapping(
|
||||
expectSymbol.asSymbol(),
|
||||
actualSymbol.asSymbol(),
|
||||
containingExpectClassSymbol.asSymbol(),
|
||||
incompatibility,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun FirRegularClassSymbol.addMemberExpectForActualMapping(
|
||||
expectMember: FirBasedSymbol<*>, actualMember: FirBasedSymbol<*>,
|
||||
expectClassSymbol: FirRegularClassSymbol, compatibility: ExpectActualCompatibility<*>,
|
||||
) {
|
||||
check(allowedWritingMemberExpectForActualMapping) { "Writing memberExpectForActual is not allowed in this context" }
|
||||
val fir = fir
|
||||
val expectForActualMap = fir.memberExpectForActual ?: mutableMapOf()
|
||||
fir.memberExpectForActual = expectForActualMap
|
||||
|
||||
val expectToCompatibilityMap = expectForActualMap.asMutableMap()
|
||||
.computeIfAbsent(actualMember to expectClassSymbol) { mutableMapOf() }
|
||||
|
||||
/*
|
||||
Don't report when value is overwritten, because it's the case for actual inner classes:
|
||||
actual class A {
|
||||
actual class B {
|
||||
actual fun foo() {} <-- twice checked (from A and B) and added to mapping
|
||||
}
|
||||
}
|
||||
*/
|
||||
expectToCompatibilityMap.asMutableMap()[expectMember] = compatibility
|
||||
}
|
||||
|
||||
private fun <K, V> Map<K, V>.asMutableMap(): MutableMap<K, V> = this as MutableMap
|
||||
|
||||
object Factory : FirExpectActualMatchingContextFactory {
|
||||
override fun create(session: FirSession, scopeSession: ScopeSession): FirExpectActualMatchingContextImpl =
|
||||
FirExpectActualMatchingContextImpl(session, scopeSession)
|
||||
override fun create(
|
||||
session: FirSession, scopeSession: ScopeSession,
|
||||
allowedWritingMemberExpectForActualMapping: Boolean,
|
||||
): FirExpectActualMatchingContextImpl =
|
||||
FirExpectActualMatchingContextImpl(session, scopeSession, allowedWritingMemberExpectForActualMapping)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir.declarations
|
||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.SymbolInternals
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||
import org.jetbrains.kotlin.resolve.multiplatform.ExpectActualCompatibility
|
||||
|
||||
@@ -31,3 +32,13 @@ val FirBasedSymbol<*>.expectForActual: ExpectForActualData?
|
||||
return fir.expectForActual
|
||||
}
|
||||
|
||||
|
||||
private object MemberExpectForActualAttributeKey : FirDeclarationDataKey()
|
||||
|
||||
// Expect class in the key is needed, because class may correspond to two expects
|
||||
// in case when two `actual typealias` point to the same class.
|
||||
typealias MemberExpectForActualData =
|
||||
Map<Pair</* actual member */ FirBasedSymbol<*>, /* expect class */ FirRegularClassSymbol>,
|
||||
Map</* expect member */ FirBasedSymbol<*>, ExpectActualCompatibility<*>>>
|
||||
|
||||
var FirRegularClass.memberExpectForActual: MemberExpectForActualData? by FirDeclarationDataRegistry.data(MemberExpectForActualAttributeKey)
|
||||
|
||||
+3
@@ -16,6 +16,7 @@ import org.jetbrains.kotlin.ir.util.classIdOrFail
|
||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
|
||||
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
||||
import org.jetbrains.kotlin.mpp.DeclarationSymbolMarker
|
||||
import org.jetbrains.kotlin.mpp.RegularClassSymbolMarker
|
||||
import org.jetbrains.kotlin.name.CallableId
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.resolve.calls.mpp.AbstractExpectActualCompatibilityChecker
|
||||
@@ -218,6 +219,8 @@ private class ExpectActualLinkCollector(
|
||||
override fun onMismatchedMembersFromClassScope(
|
||||
expectSymbol: DeclarationSymbolMarker,
|
||||
actualSymbolsByIncompatibility: Map<ExpectActualCompatibility.Incompatible<*>, List<DeclarationSymbolMarker>>,
|
||||
containingExpectClassSymbol: RegularClassSymbolMarker?,
|
||||
containingActualClassSymbol: RegularClassSymbolMarker?,
|
||||
) {
|
||||
require(expectSymbol is IrSymbol)
|
||||
if (actualSymbolsByIncompatibility.isEmpty() && !expectSymbol.owner.containsOptionalExpectation()) {
|
||||
|
||||
+6
-2
@@ -31,7 +31,6 @@ import org.jetbrains.kotlin.resolve.checkers.OptInNames
|
||||
import org.jetbrains.kotlin.types.AbstractTypeChecker
|
||||
import org.jetbrains.kotlin.types.TypeCheckerState
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import org.jetbrains.kotlin.types.model.AnnotationMarker
|
||||
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
|
||||
import org.jetbrains.kotlin.types.model.TypeSubstitutorMarker
|
||||
import org.jetbrains.kotlin.types.model.TypeSystemContext
|
||||
@@ -440,7 +439,12 @@ internal abstract class IrExpectActualMatchingContext(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onMatchedMembers(expectSymbol: DeclarationSymbolMarker, actualSymbol: DeclarationSymbolMarker) {
|
||||
override fun onMatchedMembers(
|
||||
expectSymbol: DeclarationSymbolMarker,
|
||||
actualSymbol: DeclarationSymbolMarker,
|
||||
containingExpectClassSymbol: RegularClassSymbolMarker?,
|
||||
containingActualClassSymbol: RegularClassSymbolMarker?,
|
||||
) {
|
||||
require(expectSymbol is IrSymbol)
|
||||
require(actualSymbol is IrSymbol)
|
||||
when (expectSymbol) {
|
||||
|
||||
+2
-2
@@ -264,7 +264,7 @@ object AbstractExpectActualCompatibilityChecker {
|
||||
for ((actualMember, compatibility) in mapping) {
|
||||
when (compatibility) {
|
||||
ExpectActualCompatibility.Compatible -> {
|
||||
onMatchedMembers(expectMember, actualMember)
|
||||
onMatchedMembers(expectMember, actualMember, expectClassSymbol, actualClassSymbol)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ object AbstractExpectActualCompatibilityChecker {
|
||||
}
|
||||
|
||||
unfulfilled?.add(expectMember to incompatibilityMap)
|
||||
onMismatchedMembersFromClassScope(expectMember, incompatibilityMap)
|
||||
onMismatchedMembersFromClassScope(expectMember, incompatibilityMap, expectClassSymbol, actualClassSymbol)
|
||||
}
|
||||
|
||||
context(ExpectActualMatchingContext<*>)
|
||||
|
||||
+9
-2
@@ -159,11 +159,18 @@ interface ExpectActualMatchingContext<T : DeclarationSymbolMarker> : TypeSystemC
|
||||
|
||||
val CallableSymbolMarker.hasStableParameterNames: Boolean
|
||||
|
||||
fun onMatchedMembers(expectSymbol: DeclarationSymbolMarker, actualSymbol: DeclarationSymbolMarker) {}
|
||||
fun onMatchedMembers(
|
||||
expectSymbol: DeclarationSymbolMarker,
|
||||
actualSymbol: DeclarationSymbolMarker,
|
||||
containingExpectClassSymbol: RegularClassSymbolMarker?,
|
||||
containingActualClassSymbol: RegularClassSymbolMarker?,
|
||||
) {}
|
||||
|
||||
fun onMismatchedMembersFromClassScope(
|
||||
expectSymbol: DeclarationSymbolMarker,
|
||||
actualSymbolsByIncompatibility: Map<ExpectActualCompatibility.Incompatible<*>, List<DeclarationSymbolMarker>>
|
||||
actualSymbolsByIncompatibility: Map<ExpectActualCompatibility.Incompatible<*>, List<DeclarationSymbolMarker>>,
|
||||
containingExpectClassSymbol: RegularClassSymbolMarker?,
|
||||
containingActualClassSymbol: RegularClassSymbolMarker?,
|
||||
) {}
|
||||
|
||||
val DeclarationSymbolMarker.annotations: List<AnnotationCallInfo>
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// LANGUAGE: +MultiPlatformProjects
|
||||
// IGNORE_BACKEND_K1: ANY
|
||||
// MODULE: common
|
||||
// FILE: common.kt
|
||||
expect class A {
|
||||
class B {
|
||||
fun foo()
|
||||
}
|
||||
}
|
||||
|
||||
// MODULE: main()()(common)
|
||||
// FILE: test.kt
|
||||
actual class A {
|
||||
actual class B {
|
||||
actual fun foo() {}
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = "OK" // check no errors are thrown during building FIR member mapping
|
||||
+6
@@ -32067,6 +32067,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
|
||||
+6
@@ -33711,6 +33711,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
|
||||
+6
@@ -33711,6 +33711,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
|
||||
+5
@@ -28729,6 +28729,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
+6
@@ -23541,6 +23541,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
|
||||
Generated
+6
@@ -23541,6 +23541,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
|
||||
+6
@@ -23541,6 +23541,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
|
||||
+6
@@ -23541,6 +23541,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
|
||||
+6
@@ -26507,6 +26507,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
@FirPipeline()
|
||||
@UseExtTestCaseGroupProvider()
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
|
||||
+6
@@ -27121,6 +27121,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
@UsePartialLinkage(mode = Mode.DISABLED)
|
||||
@Tag("no-partial-linkage-may-be-skipped")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
|
||||
+6
@@ -26201,6 +26201,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
@UseExtTestCaseGroupProvider()
|
||||
@DisabledTestsIfProperty(sourceLocations = { "compiler/testData/codegen/box/coroutines/featureIntersection/defaultExpect.kt", "compiler/testData/codegen/box/multiplatform/defaultArguments/*.kt", "compiler/testData/codegen/box/multiplatform/migratedOldTests/*.kt", "compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt" }, property = ClassLevelProperty.TEST_MODE, propertyValue = "ONE_STAGE_MULTI_MODULE")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
|
||||
+6
@@ -26508,6 +26508,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
@UsePartialLinkage(mode = Mode.DISABLED)
|
||||
@Tag("no-partial-linkage-may-be-skipped")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
|
||||
Generated
+6
@@ -23295,6 +23295,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
|
||||
Generated
+6
@@ -23295,6 +23295,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
|
||||
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class K2 {
|
||||
@Test
|
||||
@TestMetadata("actualInnerClassesFirMemberMapping.kt")
|
||||
public void testActualInnerClassesFirMemberMapping() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/actualInnerClassesFirMemberMapping.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInK2() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
|
||||
Reference in New Issue
Block a user