diff --git a/analysis/decompiled/decompiler-to-file-stubs/testData/clsFileStubBuilder/TypeAliases/TypeAliases.kt b/analysis/decompiled/decompiler-to-file-stubs/testData/clsFileStubBuilder/TypeAliases/TypeAliases.kt index 3309a593352..ec750db8780 100644 --- a/analysis/decompiled/decompiler-to-file-stubs/testData/clsFileStubBuilder/TypeAliases/TypeAliases.kt +++ b/analysis/decompiled/decompiler-to-file-stubs/testData/clsFileStubBuilder/TypeAliases/TypeAliases.kt @@ -1,3 +1,5 @@ +// FIR_IGNORE +// Ignore reason: FIR does not support nested typealiases (especially inside inner classes) package test import dependency.* diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.kt index 8d500c8e3cc..bcfefdddc83 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.kt @@ -7,6 +7,8 @@ package org.jetbrains.kotlin.fir.backend import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.signaturer.FirBasedSignatureComposer +import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag +import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl import org.jetbrains.kotlin.ir.util.IdSignatureComposer @@ -36,4 +38,6 @@ class Fir2IrCommonMemberStorage( val propertyCache: ConcurrentHashMap = ConcurrentHashMap() val fakeOverridesInClass: MutableMap> = mutableMapOf() + + val irFakeOverridesForRealFirFakeOverrideMap: MutableMap = mutableMapOf() } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt index e6b86331625..ce702dff32a 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt @@ -117,6 +117,20 @@ class Fir2IrDeclarationStorage( private val fakeOverridesInClass: MutableMap> = commonMemberStorage.fakeOverridesInClass + /* + * FIR declarations for substitution and intersection overrides are session dependent, which means that in MPP project + * we can have two different functions for the same substitution overrides (in common and platform modules) + * + * So this cache is needed to have only one IR declaration for both overrides + * + * The key here is a pair of the original function (first not f/o) and lookup tag of class for which this fake override was created + * THe value is IR function, build for this fake override during fir2ir translation of the module that contains parent class of this function + */ + private val irFakeOverridesForRealFirFakeOverrideMap: MutableMap = + commonMemberStorage.irFakeOverridesForRealFirFakeOverrideMap + + data class FakeOverrideIdentifier(val originalSymbol: FirCallableSymbol<*>, val dispatchReceiverLookupTag: ConeClassLikeLookupTag) + sealed class FakeOverrideKey { data class Signature(val signature: IdSignature) : FakeOverrideKey() @@ -554,16 +568,13 @@ class Fir2IrDeclarationStorage( return this } - fun getCachedIrFunction(function: FirFunction): IrSimpleFunction? = - if (function is FirSimpleFunction) getCachedIrFunction(function) + fun getCachedIrFunction(function: FirFunction): IrSimpleFunction? { + return if (function is FirSimpleFunction) getCachedIrFunction(function) else localStorage.getLocalFunction(function) + } fun getCachedIrFunction(function: FirSimpleFunction): IrSimpleFunction? { - return if (function.visibility == Visibilities.Local) { - localStorage.getLocalFunction(function) - } else { - functionCache[function] - } + return getCachedIrFunction(function, fakeOverrideOwnerLookupTag = null) { signatureComposer.composeSignature(function) } } fun getCachedIrFunction( @@ -574,9 +585,15 @@ class Fir2IrDeclarationStorage( if (function.visibility == Visibilities.Local) { return localStorage.getLocalFunction(function) } - return getCachedIrCallable(function, fakeOverrideOwnerLookupTag, functionCache, signatureCalculator) { signature -> + val cachedIrCallable = getCachedIrCallable( + function, + fakeOverrideOwnerLookupTag, + functionCache, + signatureCalculator + ) { signature -> symbolTable.referenceSimpleFunctionIfAny(signature)?.owner } + return cachedIrCallable } internal fun cacheDelegationFunction(function: FirSimpleFunction, irFunction: IrSimpleFunction) { @@ -702,6 +719,11 @@ class Fir2IrDeclarationStorage( created.overriddenSymbols += getIrFunctionSymbol(it) as IrSimpleFunctionSymbol } } + if (function.isSubstitutionOrIntersectionOverride) { + val originalFunction = function.unwrapFakeOverrides() + val key = FakeOverrideIdentifier(originalFunction.symbol, function.dispatchReceiverClassLookupTagOrNull()!!) + irFakeOverridesForRealFirFakeOverrideMap[key] = created + } functionCache[function] = created return created } @@ -1114,6 +1136,11 @@ class Fir2IrDeclarationStorage( leaveScope(this) } } + if (property.isSubstitutionOrIntersectionOverride) { + val originalProperty = property.unwrapFakeOverrides() + val key = FakeOverrideIdentifier(originalProperty.symbol, property.dispatchReceiverClassLookupTagOrNull()!!) + irFakeOverridesForRealFirFakeOverrideMap[key] = result + } propertyCache[property] = result result } @@ -1126,7 +1153,12 @@ class Fir2IrDeclarationStorage( fakeOverrideOwnerLookupTag: ConeClassLikeLookupTag?, signatureCalculator: () -> IdSignature? ): IrProperty? { - return getCachedIrCallable(property, fakeOverrideOwnerLookupTag, propertyCache, signatureCalculator) { signature -> + return getCachedIrCallable( + property, + fakeOverrideOwnerLookupTag, + propertyCache, + signatureCalculator + ) { signature -> symbolTable.referencePropertyIfAny(signature)?.owner } } @@ -1138,13 +1170,33 @@ class Fir2IrDeclarationStorage( signatureCalculator: () -> IdSignature?, referenceIfAny: (IdSignature) -> IC? ): IC? { - val isFakeOverride = fakeOverrideOwnerLookupTag != null && fakeOverrideOwnerLookupTag != declaration.containingClassLookupTag() - if (!isFakeOverride) { + val isFakeFakeOverride = fakeOverrideOwnerLookupTag != null && fakeOverrideOwnerLookupTag != declaration.containingClassLookupTag() + if (!isFakeFakeOverride) { cache[declaration]?.let { return it } } + /* + * There are three types of declarations: + * 1. Real declarations. They are stored in simple FirDeclaration -> IrDeclaration cache + * 2. "Real" fake overrides (fake overrides, which have their own declaration in FIR, such as substitution and intersection + * overrides). They are stored in [irFakeOverridesForRealFirFakeOverrideMap], where key is original real declaration and + * specific dispatch receiver of particular fake override. This cache is needed, because we can have two different FIR + * f/o for common and platform modules (because they are session dependant), but we should create IR declaration for them + * only once. So [irFakeOverridesForRealFirFakeOverrideMap] is shared between fir2ir conversion for different MPP modules + * (see KT-58229) + * 3. "Fake" fake overrides (fake overrides without some real FIR declaration). Right now they are stored in symbol table. + * TODO: they also should be stored in [irFakeOverridesForRealFirFakeOverrideMap], see KT-60850 + */ + val isRealFakeOverride = declaration.isSubstitutionOrIntersectionOverride + if (isRealFakeOverride) { + val key = FakeOverrideIdentifier( + declaration.originalIfFakeOverride()!!.symbol, + declaration.dispatchReceiverClassLookupTagOrNull()!! + ) + irFakeOverridesForRealFirFakeOverrideMap[key]?.let { return it as IC } + } return signatureCalculator()?.let { signature -> referenceIfAny(signature)?.let { irDeclaration -> - if (!isFakeOverride) { + if (!isFakeFakeOverride) { cache[declaration] = irDeclaration } irDeclaration diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index ecfc0a91e9e..aafa7e1b231 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -33841,6 +33841,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-51753-1.kt") public void testKt_51753_1() throws Exception { @@ -33859,6 +33865,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("noArgActualConstructor.kt") public void testNoArgActualConstructor() throws Exception { @@ -33883,6 +33901,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index eff65bd5233..c55c8d70751 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -33841,6 +33841,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-51753-1.kt") public void testKt_51753_1() throws Exception { @@ -33859,6 +33865,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("noArgActualConstructor.kt") public void testNoArgActualConstructor() throws Exception { @@ -33883,6 +33901,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt new file mode 100644 index 00000000000..8d9ca9c7124 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt @@ -0,0 +1,48 @@ +// LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K1: ANY +// ISSUE: KT-58229 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect class Expect { + fun o(): String + val k: String +} + +interface Base1 { + fun foo(x: Expect): String + val Expect.bar: String +} + +interface Base2 { + fun foo(x: Expect): String + val Expect.bar: String +} + +interface Derived : Base1, Base2 + +// MODULE: platform()()(common) +// FILE: platform.kt + +class Impl : Derived { + override fun foo(x: Expect): String = x.o() + override val Expect.bar: String get() = this.k +} + +class ActualTarget { + fun o(): String = "O" + val k: String = "K" +} + +actual typealias Expect = ActualTarget + +fun test(x: Derived): String { + val actual = ActualTarget() + return x.foo(actual) + with(x) { actual.k } +} + +fun box(): String { + return test(Impl()) +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt new file mode 100644 index 00000000000..30f3f22ab58 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt @@ -0,0 +1,63 @@ +// LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K1: ANY +// ISSUE: KT-58229 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect class Expect { + fun o(): String + val k: String +} + +interface Base1 { + fun foo(x: Expect): String + val Expect.bar: String +} + +interface Base2 { + fun foo(x: Expect): String + val Expect.bar: String +} + +interface Derived : Base1, Base2 + +fun testCommon(expect: Expect): String { + class LocalCommon : Derived { + override fun foo(x: Expect): String = x.o() + override val Expect.bar: String get() = this.k + } + val x = LocalCommon() + return x.foo(expect) + with(x) { expect.k } +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +class Impl : Derived { + override fun foo(x: Expect): String = x.o() + override val Expect.bar: String get() = this.k +} + +class ActualTarget { + fun o(): String = "O" + val k: String = "K" +} + +actual typealias Expect = ActualTarget + +fun testPlatform(actual: Expect): String { + class LocalPlatform : Derived { + override fun foo(x: Expect): String = x.o() + override val Expect.bar: String get() = this.k + } + val x = LocalPlatform() + return x.foo(actual) + with(x) { actual.k } +} + +fun box(): String { + val actual = ActualTarget() + if (testCommon(actual) != "OK") return "Fail" + return testPlatform(actual) +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt new file mode 100644 index 00000000000..a07daddc014 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt @@ -0,0 +1,49 @@ +// LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K1: ANY +// ISSUE: KT-58229 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect class Expect { + fun o(): String + val k: String +} + +interface Base { + fun foo(x: Expect): String = x.o() + val Expect.bar: String get() = this.k +} + +interface Derived : Base + +fun testCommon(expect: Expect): String { + class LocalCommon : Derived + val x = LocalCommon() + + return x.foo(expect) + with(x) { expect.k } +} + +// MODULE: platform()()(common) +// FILE: platform.kt + +class ActualTarget { + fun o(): String = "O" + val k: String = "K" +} + +actual typealias Expect = ActualTarget + +fun testPlatform(actual: ActualTarget): String { + class LocalPlatform : Derived + val x = LocalPlatform() + + return x.foo(actual) + with(x) { actual.k } +} + +fun box(): String { + val actual = ActualTarget() + if (testCommon(actual) != "OK") return "Fail" + return testPlatform(actual) +} diff --git a/compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt b/compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt new file mode 100644 index 00000000000..1854d61ba95 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt @@ -0,0 +1,40 @@ +// LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K1: ANY +// ISSUE: KT-58229 +// WITH_STDLIB + +// MODULE: common +// FILE: common.kt + +expect class Expect { + fun o(): String + val k: String +} + +interface Base { + fun foo(x: Expect): String = x.o() + val Expect.bar: String get() = this.k +} + +interface Derived : Base + +// MODULE: platform()()(common) +// FILE: platform.kt + +class Impl : Derived + +class ActualTarget { + fun o(): String = "O" + val k: String = "K" +} + +actual typealias Expect = ActualTarget + +fun test(x: Derived): String { + val actual = ActualTarget() + return x.foo(actual) + with(x) { actual.k } +} + +fun box(): String { + return test(Impl()) +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index d9378a9b9be..118e5ed4f09 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -32203,12 +32203,30 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("noArgActualConstructor.kt") public void testNoArgActualConstructor() throws Exception { @@ -32233,6 +32251,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 06097213897..6b71976d76f 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -33841,6 +33841,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-51753-1.kt") public void testKt_51753_1() throws Exception { @@ -33859,6 +33865,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("noArgActualConstructor.kt") public void testNoArgActualConstructor() throws Exception { @@ -33883,6 +33901,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 82b8af9db59..dd4897b57fa 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -33841,6 +33841,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-51753-1.kt") public void testKt_51753_1() throws Exception { @@ -33859,6 +33865,18 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("noArgActualConstructor.kt") public void testNoArgActualConstructor() throws Exception { @@ -33883,6 +33901,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 9f038513d43..1374ab153c8 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -28852,6 +28852,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @TestMetadata("kt-51753-1.kt") public void testKt_51753_1() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-51753-1.kt"); @@ -28867,11 +28872,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt"); } + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/transitiveSuperclassActualization.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index 8a8fc46f3c4..85ac663e682 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -23659,12 +23659,30 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -23683,6 +23701,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index ae5357e2d24..c39deddcc80 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -23659,12 +23659,30 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -23683,6 +23701,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index d480c4b5c92..8f9965b7fba 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -23659,12 +23659,30 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -23683,6 +23701,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index 2b3e2a662e2..6f90a87ba38 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -23659,12 +23659,30 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -23683,6 +23701,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index 68f534ebe27..0e3d8f51bed 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -26631,12 +26631,30 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -26655,6 +26673,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index e37d25e70a8..01a06ba1e58 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -27245,12 +27245,30 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -27269,6 +27287,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index 436ce962810..180c0c095ba 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -26325,12 +26325,30 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -26349,6 +26367,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 41cc513c4cc..1fdc619e184 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -26632,12 +26632,30 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -26656,6 +26674,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index da670c13c39..275aa7ebbd5 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -23407,12 +23407,30 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -23431,6 +23449,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 81a6395bb34..c168940bbc4 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -23407,12 +23407,30 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt"); } + @Test + @TestMetadata("intersectionOverrideInCommonModule.kt") + public void testIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/intersectionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("kt-56329.kt") public void testKt_56329() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt"); } + @Test + @TestMetadata("localIntersectionOverrideInCommonModule.kt") + public void testLocalIntersectionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localIntersectionOverrideInCommonModule.kt"); + } + + @Test + @TestMetadata("localSubstitutionOverrideInCommonModule.kt") + public void testLocalSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/localSubstitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("nonExternalEquals.kt") public void testNonExternalEquals() throws Exception { @@ -23431,6 +23449,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt"); } + @Test + @TestMetadata("substitutionOverrideInCommonModule.kt") + public void testSubstitutionOverrideInCommonModule() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/k2/basic/substitutionOverrideInCommonModule.kt"); + } + @Test @TestMetadata("transitiveSuperclassActualization.kt") public void testTransitiveSuperclassActualization() throws Exception {