[K2, MPP] Fix actualization of fake overrides (fixes a set of bugs in coroutines / ktor)
Split MissingFakeOverridesAdder on FakeOverridesActualizer and ActualFakeOverridesAdder ^KT-57984 Fixed ^KT-58003 Fixed ^KT-58124 Fixed ^KT-57833 Fixed ^KT-58153 Fixed
This commit is contained in:
committed by
Space Team
parent
58f8e25bfe
commit
432c781ff7
+18
@@ -97,6 +97,18 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
|
|||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/kt54827.kt");
|
runTest("compiler/testData/diagnostics/tests/multiplatform/kt54827.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt58153.kt")
|
||||||
|
public void testKt58153() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/kt58153.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("manyImplMemberNotImplemented.kt")
|
||||||
|
public void testManyImplMemberNotImplemented() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/manyImplMemberNotImplemented.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("manyInterfacesMemberNotImplemented.kt")
|
@TestMetadata("manyInterfacesMemberNotImplemented.kt")
|
||||||
public void testManyInterfacesMemberNotImplemented() throws Exception {
|
public void testManyInterfacesMemberNotImplemented() throws Exception {
|
||||||
@@ -109,6 +121,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
|
|||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt");
|
runTest("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multipleExpectInterfacesImplementation.kt")
|
||||||
|
public void testMultipleExpectInterfacesImplementation() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/multipleExpectInterfacesImplementation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("namedArguments.kt")
|
@TestMetadata("namedArguments.kt")
|
||||||
public void testNamedArguments() throws Exception {
|
public void testNamedArguments() throws Exception {
|
||||||
|
|||||||
+18
@@ -97,6 +97,18 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
|
|||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/kt54827.kt");
|
runTest("compiler/testData/diagnostics/tests/multiplatform/kt54827.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt58153.kt")
|
||||||
|
public void testKt58153() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/kt58153.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("manyImplMemberNotImplemented.kt")
|
||||||
|
public void testManyImplMemberNotImplemented() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/manyImplMemberNotImplemented.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("manyInterfacesMemberNotImplemented.kt")
|
@TestMetadata("manyInterfacesMemberNotImplemented.kt")
|
||||||
public void testManyInterfacesMemberNotImplemented() throws Exception {
|
public void testManyInterfacesMemberNotImplemented() throws Exception {
|
||||||
@@ -109,6 +121,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
|
|||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt");
|
runTest("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multipleExpectInterfacesImplementation.kt")
|
||||||
|
public void testMultipleExpectInterfacesImplementation() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/multipleExpectInterfacesImplementation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("namedArguments.kt")
|
@TestMetadata("namedArguments.kt")
|
||||||
public void testNamedArguments() throws Exception {
|
public void testNamedArguments() throws Exception {
|
||||||
|
|||||||
+54
@@ -33351,6 +33351,42 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -33399,6 +33435,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -33423,6 +33465,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-51753-1.kt")
|
@TestMetadata("kt-51753-1.kt")
|
||||||
public void testKt_51753_1() throws Exception {
|
public void testKt_51753_1() throws Exception {
|
||||||
@@ -33453,6 +33501,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -33351,6 +33351,42 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -33399,6 +33435,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -33423,6 +33465,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-51753-1.kt")
|
@TestMetadata("kt-51753-1.kt")
|
||||||
public void testKt_51753_1() throws Exception {
|
public void testKt_51753_1() throws Exception {
|
||||||
@@ -33453,6 +33501,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+7
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.diagnostics.rendering.RootDiagnosticRendererFactory
|
|||||||
object CommonBackendErrors {
|
object CommonBackendErrors {
|
||||||
val NO_ACTUAL_FOR_EXPECT by error2<PsiElement, String, ModuleDescriptor>()
|
val NO_ACTUAL_FOR_EXPECT by error2<PsiElement, String, ModuleDescriptor>()
|
||||||
val MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED by error2<PsiElement, String, String>()
|
val MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED by error2<PsiElement, String, String>()
|
||||||
|
val MANY_IMPL_MEMBER_NOT_IMPLEMENTED by error2<PsiElement, String, String>()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
RootDiagnosticRendererFactory.registerFactory(KtDefaultCommonBackendErrorMessages)
|
RootDiagnosticRendererFactory.registerFactory(KtDefaultCommonBackendErrorMessages)
|
||||||
@@ -37,5 +38,11 @@ object KtDefaultCommonBackendErrorMessages : BaseDiagnosticRendererFactory() {
|
|||||||
STRING,
|
STRING,
|
||||||
STRING,
|
STRING,
|
||||||
)
|
)
|
||||||
|
map.put(
|
||||||
|
CommonBackendErrors.MANY_IMPL_MEMBER_NOT_IMPLEMENTED,
|
||||||
|
"{0} must override {1} because it inherits many implementations of it",
|
||||||
|
STRING,
|
||||||
|
STRING,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+120
@@ -0,0 +1,120 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.backend.common.actualizer
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.KtDiagnosticReporterWithImplicitIrBasedContext
|
||||||
|
import org.jetbrains.kotlin.backend.common.CommonBackendErrors
|
||||||
|
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
|
||||||
|
import org.jetbrains.kotlin.ir.IrElement
|
||||||
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
|
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
||||||
|
import org.jetbrains.kotlin.ir.types.classifierOrFail
|
||||||
|
import org.jetbrains.kotlin.ir.util.isInterface
|
||||||
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
|
||||||
|
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It adds fake overrides to non-expect classes inside common or multi-platform module,
|
||||||
|
* taken from these non-expect classes actualized super classes.
|
||||||
|
*
|
||||||
|
* In case when a non-expect class has direct or indirect expect supertypes,
|
||||||
|
* it may happen that the actual classes for these supertypes contain additional (non-actual) members that don't exist in their expect counterparts.
|
||||||
|
* We still should have fake overrides generated for these members, but FIR2IR isn't able to see their base members in common or multi-platform module.
|
||||||
|
* This class is intended to search for such situations and generate such fake overrides.
|
||||||
|
*/
|
||||||
|
internal class ActualFakeOverridesAdder(
|
||||||
|
private val expectActualMap: Map<IrSymbol, IrSymbol>,
|
||||||
|
private val diagnosticsReporter: KtDiagnosticReporterWithImplicitIrBasedContext
|
||||||
|
) : IrElementVisitorVoid {
|
||||||
|
private val missingActualMembersMap = mutableMapOf<IrClass, MutableMap<String, MutableList<IrDeclaration>>>()
|
||||||
|
|
||||||
|
override fun visitClass(declaration: IrClass) {
|
||||||
|
extractMissingActualMembersFromSupertypes(declaration)
|
||||||
|
visitElement(declaration)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun visitElement(element: IrElement) {
|
||||||
|
element.acceptChildrenVoid(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun extractMissingActualMembersFromSupertypes(klass: IrClass): Map<String, MutableList<IrDeclaration>> {
|
||||||
|
missingActualMembersMap[klass]?.let { return it }
|
||||||
|
|
||||||
|
val missingActualMembers = mutableMapOf<String, MutableList<IrDeclaration>>()
|
||||||
|
missingActualMembersMap[klass] = missingActualMembers
|
||||||
|
|
||||||
|
// New members from supertypes are only relevant for not expect (ordinary) classes
|
||||||
|
// New members from the current class are only relevant for actualized expect classes
|
||||||
|
|
||||||
|
val processedMembers = mutableMapOf<String, MutableList<IrDeclaration>>()
|
||||||
|
for (superType in klass.superTypes) {
|
||||||
|
val membersFromSupertype = extractMissingActualMembersFromSupertypes(superType.classifierOrFail.owner as IrClass)
|
||||||
|
if (!klass.isExpect) {
|
||||||
|
missingActualMembers.appendMissingMembersToNotExpectClass(klass, membersFromSupertype, processedMembers)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val actualClass = expectActualMap[klass.symbol]?.owner as? IrClass ?: return missingActualMembers
|
||||||
|
|
||||||
|
missingActualMembers.appendMissingMembersFromActualizedExpectClass(klass, actualClass)
|
||||||
|
|
||||||
|
return missingActualMembers
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun MutableMap<String, MutableList<IrDeclaration>>.appendMissingMembersToNotExpectClass(
|
||||||
|
klass: IrClass,
|
||||||
|
membersFromSupertype: Map<String, MutableList<IrDeclaration>>,
|
||||||
|
processedMembers: MutableMap<String, MutableList<IrDeclaration>>
|
||||||
|
) {
|
||||||
|
for (memberFromSupertype in membersFromSupertype.flatMap { it.value }) {
|
||||||
|
val newMember = createFakeOverrideMember(listOf(memberFromSupertype), klass)
|
||||||
|
val name = newMember.getFunctionOrPropertyName()
|
||||||
|
if (getMatches(name, newMember, expectActualMap).isEmpty()) {
|
||||||
|
processedMembers.addMember(memberFromSupertype as IrOverridableDeclaration<*>)
|
||||||
|
addMember(newMember)
|
||||||
|
klass.addMember(newMember)
|
||||||
|
} else {
|
||||||
|
val baseMember = processedMembers.getMatches(name, newMember, expectActualMap).single()
|
||||||
|
val errorFactory =
|
||||||
|
if ((baseMember.parent as IrClass).isInterface && (memberFromSupertype.parent as IrClass).isInterface)
|
||||||
|
CommonBackendErrors.MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED
|
||||||
|
else
|
||||||
|
CommonBackendErrors.MANY_IMPL_MEMBER_NOT_IMPLEMENTED
|
||||||
|
diagnosticsReporter.at(klass).report(
|
||||||
|
errorFactory,
|
||||||
|
klass.name.asString(),
|
||||||
|
(memberFromSupertype as IrDeclarationWithName).name.asString()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun MutableMap<String, MutableList<IrDeclaration>>.appendMissingMembersFromActualizedExpectClass(
|
||||||
|
expectClass: IrClass,
|
||||||
|
actualClass: IrClass,
|
||||||
|
) {
|
||||||
|
val actualWithCorrespondingExpectMembers = hashSetOf<IrSymbol>().apply {
|
||||||
|
expectClass.declarations.mapNotNullTo(this) { expectActualMap[(it as? IrOverridableDeclaration<*>)?.symbol] }
|
||||||
|
}
|
||||||
|
|
||||||
|
for (actualMember in actualClass.declarations) {
|
||||||
|
if (actualMember is IrOverridableDeclaration<*> &&
|
||||||
|
(actualMember as? IrDeclarationWithVisibility)?.visibility != DescriptorVisibilities.PRIVATE &&
|
||||||
|
!actualWithCorrespondingExpectMembers.contains(actualMember.symbol)
|
||||||
|
) {
|
||||||
|
addMember(actualMember)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun MutableMap<String, MutableList<IrDeclaration>>.addMember(member: IrOverridableDeclaration<*>) {
|
||||||
|
getOrPut(member.getFunctionOrPropertyName()) { mutableListOf() }.add(member)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun IrOverridableDeclaration<*>.getFunctionOrPropertyName(): String {
|
||||||
|
return (this as IrDeclarationWithName).name.asString() + (if (this is IrSimpleFunction) "()" else "")
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
-20
@@ -11,6 +11,7 @@ import org.jetbrains.kotlin.ir.declarations.*
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.classifierOrFail
|
import org.jetbrains.kotlin.ir.types.classifierOrFail
|
||||||
|
import org.jetbrains.kotlin.ir.util.isFakeOverride
|
||||||
import org.jetbrains.kotlin.ir.util.kotlinFqName
|
import org.jetbrains.kotlin.ir.util.kotlinFqName
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
|
||||||
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
||||||
@@ -21,12 +22,12 @@ internal class ExpectActualCollector(
|
|||||||
private val dependentFragments: List<IrModuleFragment>,
|
private val dependentFragments: List<IrModuleFragment>,
|
||||||
private val diagnosticsReporter: KtDiagnosticReporterWithImplicitIrBasedContext
|
private val diagnosticsReporter: KtDiagnosticReporterWithImplicitIrBasedContext
|
||||||
) {
|
) {
|
||||||
fun collect(): Pair<Map<IrSymbol, IrSymbol>, Map<FqName, FqName>> {
|
fun collect(): MutableMap<IrSymbol, IrSymbol> {
|
||||||
val result = mutableMapOf<IrSymbol, IrSymbol>()
|
val result = mutableMapOf<IrSymbol, IrSymbol>()
|
||||||
// Collect and link classes at first to make it possible to expand type aliases on the members linking
|
// Collect and link classes at first to make it possible to expand type aliases on the members linking
|
||||||
val (actualMembers, expectActualTypeAliasMap) = result.appendExpectActualClassMap()
|
val (actualMembers, expectActualTypeAliasMap) = result.appendExpectActualClassMap()
|
||||||
result.appendExpectActualMemberMap(actualMembers, expectActualTypeAliasMap)
|
result.appendExpectActualMemberMap(actualMembers, expectActualTypeAliasMap)
|
||||||
return result to expectActualTypeAliasMap
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun MutableMap<IrSymbol, IrSymbol>.appendExpectActualClassMap(): Pair<List<IrDeclarationBase>, Map<FqName, FqName>> {
|
private fun MutableMap<IrSymbol, IrSymbol>.appendExpectActualClassMap(): Pair<List<IrDeclarationBase>, Map<FqName, FqName>> {
|
||||||
@@ -157,39 +158,37 @@ private class MemberLinksCollector(
|
|||||||
if ((declaration.parent as IrClass).isExpect) addLink(declaration)
|
if ((declaration.parent as IrClass).isExpect) addLink(declaration)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addLink(declaration: IrDeclarationBase) {
|
private fun addLink(expectDeclaration: IrDeclarationBase) {
|
||||||
val actualMemberMatches = actualMembers.getMatches(declaration, expectActualMap, typeAliasMap)
|
val actualMemberMatches = actualMembers.getMatches(expectDeclaration, expectActualMap, typeAliasMap)
|
||||||
when {
|
when {
|
||||||
actualMemberMatches.size == 1 -> {
|
actualMemberMatches.size == 1 -> {
|
||||||
val actualMember = actualMemberMatches.single()
|
expectActualMap.addLink(expectDeclaration, actualMemberMatches.single())
|
||||||
expectActualMap[declaration.symbol] = actualMember.symbol
|
|
||||||
if (declaration is IrProperty) {
|
|
||||||
val actualProperty = actualMember as IrProperty
|
|
||||||
declaration.getter?.let {
|
|
||||||
val getter = actualProperty.getter!!
|
|
||||||
expectActualMap[it.symbol] = getter.symbol
|
|
||||||
expectActualMap.appendTypeParametersMap(it, getter)
|
|
||||||
}
|
|
||||||
declaration.setter?.symbol?.let { expectActualMap[it] = actualProperty.setter!!.symbol }
|
|
||||||
} else if (declaration is IrFunction) {
|
|
||||||
expectActualMap.appendTypeParametersMap(declaration, actualMember as IrFunction)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
actualMemberMatches.size > 1 -> {
|
actualMemberMatches.size > 1 -> {
|
||||||
// TODO: report AMBIGUOUS_ACTUALS here, see KT-57932
|
// TODO: report AMBIGUOUS_ACTUALS here, see KT-57932
|
||||||
}
|
}
|
||||||
!declaration.parent.containsOptionalExpectation() && !(declaration is IrConstructor && declaration.isPrimary) -> {
|
(expectDeclaration.parent as? IrClass)?.isExpect == false && expectDeclaration.isFakeOverride -> {
|
||||||
diagnosticsReporter.reportMissingActual(declaration)
|
// Remaining expect fake override members from not expect classes will be actualized in FakeOverridesTransformer
|
||||||
|
// It occurs in a separated step because they require filled expectActualMap for members from expect classes
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
if (shouldReportMissingActual(expectDeclaration)) {
|
||||||
|
diagnosticsReporter.reportMissingActual(expectDeclaration)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun shouldReportMissingActual(declaration: IrDeclarationBase): Boolean {
|
||||||
|
return !declaration.parent.containsOptionalExpectation() && !(declaration is IrConstructor && declaration.isPrimary)
|
||||||
|
}
|
||||||
|
|
||||||
override fun visitElement(element: IrElement) {
|
override fun visitElement(element: IrElement) {
|
||||||
element.acceptChildrenVoid(this)
|
element.acceptChildrenVoid(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun MutableMap<IrSymbol, IrSymbol>.appendTypeParametersMap(
|
fun MutableMap<IrSymbol, IrSymbol>.appendTypeParametersMap(
|
||||||
expectTypeParametersContainer: IrTypeParametersContainer,
|
expectTypeParametersContainer: IrTypeParametersContainer,
|
||||||
actualTypeParametersContainer: IrTypeParametersContainer
|
actualTypeParametersContainer: IrTypeParametersContainer
|
||||||
) {
|
) {
|
||||||
|
|||||||
+17
-4
@@ -7,7 +7,11 @@ package org.jetbrains.kotlin.backend.common.actualizer
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.symbols.*
|
import org.jetbrains.kotlin.ir.symbols.*
|
||||||
import org.jetbrains.kotlin.ir.util.*
|
import org.jetbrains.kotlin.ir.util.DeepCopyIrTreeWithSymbols
|
||||||
|
import org.jetbrains.kotlin.ir.util.SymbolRemapper
|
||||||
|
import org.jetbrains.kotlin.ir.util.SymbolRenamer
|
||||||
|
import org.jetbrains.kotlin.ir.util.TypeRemapper
|
||||||
|
import org.jetbrains.kotlin.utils.memoryOptimizedMap
|
||||||
|
|
||||||
internal class ActualizerSymbolRemapper(private val expectActualMap: Map<IrSymbol, IrSymbol>) : SymbolRemapper {
|
internal class ActualizerSymbolRemapper(private val expectActualMap: Map<IrSymbol, IrSymbol>) : SymbolRemapper {
|
||||||
override fun getDeclaredClass(symbol: IrClassSymbol) = symbol
|
override fun getDeclaredClass(symbol: IrClassSymbol) = symbol
|
||||||
@@ -71,7 +75,7 @@ internal class ActualizerSymbolRemapper(private val expectActualMap: Map<IrSymbo
|
|||||||
private inline fun <reified S : IrSymbol> S.actualizeSymbol(): S = (expectActualMap[this] as? S) ?: this
|
private inline fun <reified S : IrSymbol> S.actualizeSymbol(): S = (expectActualMap[this] as? S) ?: this
|
||||||
}
|
}
|
||||||
|
|
||||||
internal open class ActualizerVisitor(symbolRemapper: SymbolRemapper, typeRemapper: TypeRemapper) :
|
internal open class ActualizerVisitor(private val symbolRemapper: SymbolRemapper, typeRemapper: TypeRemapper) :
|
||||||
DeepCopyIrTreeWithSymbols(symbolRemapper, typeRemapper, SymbolRenamer.DEFAULT) {
|
DeepCopyIrTreeWithSymbols(symbolRemapper, typeRemapper, SymbolRenamer.DEFAULT) {
|
||||||
override fun visitModuleFragment(declaration: IrModuleFragment) =
|
override fun visitModuleFragment(declaration: IrModuleFragment) =
|
||||||
declaration.also { it.transformChildren(this, null) }
|
declaration.also { it.transformChildren(this, null) }
|
||||||
@@ -94,7 +98,11 @@ internal open class ActualizerVisitor(symbolRemapper: SymbolRemapper, typeRemapp
|
|||||||
it.transformChildren(this, null)
|
it.transformChildren(this, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visitSimpleFunction(declaration: IrSimpleFunction) = visitFunction(declaration) as IrSimpleFunction
|
override fun visitSimpleFunction(declaration: IrSimpleFunction) = (visitFunction(declaration) as IrSimpleFunction).also {
|
||||||
|
it.overriddenSymbols = it.overriddenSymbols.memoryOptimizedMap { symbol ->
|
||||||
|
symbolRemapper.getReferencedFunction(symbol) as IrSimpleFunctionSymbol
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun visitConstructor(declaration: IrConstructor) = visitFunction(declaration) as IrConstructor
|
override fun visitConstructor(declaration: IrConstructor) = visitFunction(declaration) as IrConstructor
|
||||||
|
|
||||||
@@ -105,7 +113,12 @@ internal open class ActualizerVisitor(symbolRemapper: SymbolRemapper, typeRemapp
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visitProperty(declaration: IrProperty) =
|
override fun visitProperty(declaration: IrProperty) =
|
||||||
declaration.also { it.transformChildren(this, null) }
|
declaration.also {
|
||||||
|
it.transformChildren(this, null)
|
||||||
|
it.overriddenSymbols = it.overriddenSymbols.memoryOptimizedMap { symbol ->
|
||||||
|
symbolRemapper.getReferencedProperty(symbol)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun visitField(declaration: IrField) =
|
override fun visitField(declaration: IrField) =
|
||||||
declaration.also {
|
declaration.also {
|
||||||
|
|||||||
+57
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.backend.common.actualizer
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.backend.common.ir.isExpect
|
||||||
|
import org.jetbrains.kotlin.ir.IrElement
|
||||||
|
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||||
|
import org.jetbrains.kotlin.ir.declarations.IrDeclaration
|
||||||
|
import org.jetbrains.kotlin.ir.declarations.IrDeclarationBase
|
||||||
|
import org.jetbrains.kotlin.ir.declarations.IrOverridableDeclaration
|
||||||
|
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
||||||
|
import org.jetbrains.kotlin.ir.util.isFakeOverride
|
||||||
|
import org.jetbrains.kotlin.ir.util.transformInPlace
|
||||||
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
|
||||||
|
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It actualizes expect fake overrides in non-expect classes inside common or multi-platform module.
|
||||||
|
*
|
||||||
|
* When some non-expect class inside a common or multi-platform module has an expect base class,
|
||||||
|
* FIR2IR generates expect fake overrides overriding the expect base class members for this non-expect class which is not correct for the backend.
|
||||||
|
* This Actualizer processes expect overridable declarations in non-expect classes and replaces them with the associated actual overridable
|
||||||
|
* declarations overriding the actual base class members.The newly created actual fake overrides are stored in expectActualMap.
|
||||||
|
*/
|
||||||
|
internal class FakeOverridesActualizer(private val expectActualMap: MutableMap<IrSymbol, IrSymbol>) : IrElementVisitorVoid {
|
||||||
|
override fun visitClass(declaration: IrClass) {
|
||||||
|
if (!declaration.isExpect) {
|
||||||
|
actualizeFakeOverrides(declaration)
|
||||||
|
}
|
||||||
|
visitElement(declaration)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun visitElement(element: IrElement) {
|
||||||
|
element.acceptChildrenVoid(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun actualizeFakeOverrides(klass: IrClass) {
|
||||||
|
fun IrDeclaration.actualize(): IrDeclaration {
|
||||||
|
if (!isExpect) return this
|
||||||
|
|
||||||
|
(expectActualMap[symbol]?.owner as? IrDeclaration)?.let { return it }
|
||||||
|
|
||||||
|
require(this is IrOverridableDeclaration<*>)
|
||||||
|
val actualizedOverrides = overriddenSymbols.map { (it.owner as IrDeclaration).actualize() }
|
||||||
|
val actualFakeOverride = createFakeOverrideMember(actualizedOverrides, parent as IrClass)
|
||||||
|
|
||||||
|
expectActualMap.addLink(this as IrDeclarationBase, actualFakeOverride)
|
||||||
|
|
||||||
|
return actualFakeOverride
|
||||||
|
}
|
||||||
|
|
||||||
|
klass.declarations.transformInPlace { if (it.isExpect && it.isFakeOverride) it.actualize() else it }
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
-7
@@ -23,27 +23,40 @@ object IrActualizer {
|
|||||||
): IrActualizedResult {
|
): IrActualizedResult {
|
||||||
val ktDiagnosticReporter = KtDiagnosticReporterWithImplicitIrBasedContext(diagnosticReporter, languageVersionSettings)
|
val ktDiagnosticReporter = KtDiagnosticReporterWithImplicitIrBasedContext(diagnosticReporter, languageVersionSettings)
|
||||||
|
|
||||||
val (expectActualMap, expectActualTypeAliasMap) = ExpectActualCollector(
|
// The ir modules processing is performed phase-to-phase:
|
||||||
|
// 1. Collect expect-actual links for classes and their members from dependent fragments
|
||||||
|
val expectActualMap = ExpectActualCollector(
|
||||||
mainFragment,
|
mainFragment,
|
||||||
dependentFragments,
|
dependentFragments,
|
||||||
ktDiagnosticReporter
|
ktDiagnosticReporter
|
||||||
).collect()
|
).collect()
|
||||||
|
|
||||||
|
// 2. Remove top-only expect declarations since they are not needed anymore and should not be presented in the final IrFragment
|
||||||
|
// Expect fake-overrides from non-expect classes remain untouched since they will be actualized in the next phase.
|
||||||
|
// Also, it doesn't remove unactualized expect declarations marked with @OptionalExpectation
|
||||||
val removedExpectDeclarations = removeExpectDeclarations(dependentFragments, expectActualMap)
|
val removedExpectDeclarations = removeExpectDeclarations(dependentFragments, expectActualMap)
|
||||||
|
|
||||||
|
// 3. Actualize expect fake overrides in non-expect classes inside common or multi-platform module.
|
||||||
|
// It's probably important to run FakeOverridesActualizer before ActualFakeOverridesAdder
|
||||||
|
FakeOverridesActualizer(expectActualMap).apply { dependentFragments.forEach { visitModuleFragment(it) } }
|
||||||
|
|
||||||
|
// 4. Add fake overrides to non-expect classes inside common or multi-platform module,
|
||||||
|
// taken from these non-expect classes actualized super classes.
|
||||||
|
ActualFakeOverridesAdder(
|
||||||
|
expectActualMap,
|
||||||
|
ktDiagnosticReporter
|
||||||
|
).apply { dependentFragments.forEach { visitModuleFragment(it) } }
|
||||||
|
|
||||||
|
// 5. Copy and actualize function parameter default values from expect functions
|
||||||
val symbolRemapper = ActualizerSymbolRemapper(expectActualMap)
|
val symbolRemapper = ActualizerSymbolRemapper(expectActualMap)
|
||||||
val typeRemapper = DeepCopyTypeRemapper(symbolRemapper)
|
val typeRemapper = DeepCopyTypeRemapper(symbolRemapper)
|
||||||
FunctionDefaultParametersActualizer(symbolRemapper, typeRemapper, expectActualMap).actualize()
|
FunctionDefaultParametersActualizer(symbolRemapper, typeRemapper, expectActualMap).actualize()
|
||||||
|
|
||||||
MissingFakeOverridesAdder(
|
// 6. Actualize expect calls in dependent fragments using info obtained in the previous steps
|
||||||
expectActualMap,
|
|
||||||
expectActualTypeAliasMap,
|
|
||||||
ktDiagnosticReporter
|
|
||||||
).apply { dependentFragments.forEach { visitModuleFragment(it) } }
|
|
||||||
|
|
||||||
val actualizerVisitor = ActualizerVisitor(symbolRemapper, typeRemapper)
|
val actualizerVisitor = ActualizerVisitor(symbolRemapper, typeRemapper)
|
||||||
dependentFragments.forEach { it.transform(actualizerVisitor, null) }
|
dependentFragments.forEach { it.transform(actualizerVisitor, null) }
|
||||||
|
|
||||||
|
// 7. Merge dependent fragments into the main one
|
||||||
mergeIrFragments(mainFragment, dependentFragments)
|
mergeIrFragments(mainFragment, dependentFragments)
|
||||||
|
|
||||||
return IrActualizedResult(removedExpectDeclarations)
|
return IrActualizedResult(removedExpectDeclarations)
|
||||||
|
|||||||
+92
-4
@@ -10,18 +10,20 @@ import org.jetbrains.kotlin.backend.common.CommonBackendErrors
|
|||||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||||
import org.jetbrains.kotlin.ir.IrElement
|
import org.jetbrains.kotlin.ir.IrElement
|
||||||
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
||||||
|
import org.jetbrains.kotlin.ir.builders.declarations.buildFun
|
||||||
|
import org.jetbrains.kotlin.ir.builders.declarations.buildProperty
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
|
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.IrDynamicType
|
import org.jetbrains.kotlin.ir.types.IrDynamicType
|
||||||
import org.jetbrains.kotlin.ir.types.classifierOrFail
|
import org.jetbrains.kotlin.ir.types.classifierOrFail
|
||||||
import org.jetbrains.kotlin.ir.types.isNullable
|
import org.jetbrains.kotlin.ir.types.isNullable
|
||||||
import org.jetbrains.kotlin.ir.util.hasAnnotation
|
import org.jetbrains.kotlin.ir.util.*
|
||||||
import org.jetbrains.kotlin.ir.util.kotlinFqName
|
|
||||||
import org.jetbrains.kotlin.ir.util.module
|
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
import org.jetbrains.kotlin.name.StandardClassIds
|
import org.jetbrains.kotlin.name.StandardClassIds
|
||||||
import org.jetbrains.kotlin.resolve.multiplatform.OptionalAnnotationUtil
|
import org.jetbrains.kotlin.resolve.multiplatform.OptionalAnnotationUtil
|
||||||
|
import org.jetbrains.kotlin.utils.addToStdlib.runIf
|
||||||
|
|
||||||
private val FLEXIBLE_NULLABILITY_ANNOTATION_FQ_NAME = StandardClassIds.Annotations.FlexibleNullability.asSingleFqName()
|
private val FLEXIBLE_NULLABILITY_ANNOTATION_FQ_NAME = StandardClassIds.Annotations.FlexibleNullability.asSingleFqName()
|
||||||
|
|
||||||
@@ -29,8 +31,15 @@ internal fun Map<String, List<IrDeclaration>>.getMatches(
|
|||||||
expectDeclaration: IrDeclaration,
|
expectDeclaration: IrDeclaration,
|
||||||
expectActualTypesMap: Map<IrSymbol, IrSymbol>,
|
expectActualTypesMap: Map<IrSymbol, IrSymbol>,
|
||||||
expectActualTypeAliasMap: Map<FqName, FqName>
|
expectActualTypeAliasMap: Map<FqName, FqName>
|
||||||
|
): List<IrDeclaration> =
|
||||||
|
getMatches(generateIrElementFullNameFromExpect(expectDeclaration, expectActualTypeAliasMap), expectDeclaration, expectActualTypesMap)
|
||||||
|
|
||||||
|
internal fun Map<String, List<IrDeclaration>>.getMatches(
|
||||||
|
mainSignature: String,
|
||||||
|
expectDeclaration: IrDeclaration,
|
||||||
|
expectActualTypesMap: Map<IrSymbol, IrSymbol>
|
||||||
): List<IrDeclaration> {
|
): List<IrDeclaration> {
|
||||||
val members = this[generateIrElementFullNameFromExpect(expectDeclaration, expectActualTypeAliasMap)] ?: return emptyList()
|
val members = this[mainSignature] ?: return emptyList()
|
||||||
return when (expectDeclaration) {
|
return when (expectDeclaration) {
|
||||||
is IrFunction -> members.getMatches(expectDeclaration, expectActualTypesMap) { it as IrFunction }
|
is IrFunction -> members.getMatches(expectDeclaration, expectActualTypesMap) { it as IrFunction }
|
||||||
is IrProperty -> members.getMatches(expectDeclaration, expectActualTypesMap) { (it as IrProperty).getter!! }
|
is IrProperty -> members.getMatches(expectDeclaration, expectActualTypesMap) { (it as IrProperty).getter!! }
|
||||||
@@ -167,6 +176,21 @@ private fun appendElementFullName(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun MutableMap<IrSymbol, IrSymbol>.addLink(expectMember: IrDeclarationBase, actualMember: IrDeclaration) {
|
||||||
|
this[expectMember.symbol] = actualMember.symbol
|
||||||
|
if (expectMember is IrProperty) {
|
||||||
|
val actualProperty = actualMember as IrProperty
|
||||||
|
expectMember.getter!!.let {
|
||||||
|
val getter = actualProperty.getter!!
|
||||||
|
this[it.symbol] = getter.symbol
|
||||||
|
this.appendTypeParametersMap(it, getter)
|
||||||
|
}
|
||||||
|
expectMember.setter?.symbol?.let { this[it] = actualProperty.setter!!.symbol }
|
||||||
|
} else if (expectMember is IrFunction) {
|
||||||
|
this.appendTypeParametersMap(expectMember, actualMember as IrFunction)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@OptIn(ObsoleteDescriptorBasedAPI::class)
|
@OptIn(ObsoleteDescriptorBasedAPI::class)
|
||||||
internal fun KtDiagnosticReporterWithImplicitIrBasedContext.reportMissingActual(irDeclaration: IrDeclaration) {
|
internal fun KtDiagnosticReporterWithImplicitIrBasedContext.reportMissingActual(irDeclaration: IrDeclaration) {
|
||||||
at(irDeclaration).report(
|
at(irDeclaration).report(
|
||||||
@@ -181,3 +205,67 @@ internal fun IrElement.containsOptionalExpectation(): Boolean {
|
|||||||
this.kind == ClassKind.ANNOTATION_CLASS &&
|
this.kind == ClassKind.ANNOTATION_CLASS &&
|
||||||
this.hasAnnotation(OptionalAnnotationUtil.OPTIONAL_EXPECTATION_FQ_NAME)
|
this.hasAnnotation(OptionalAnnotationUtil.OPTIONAL_EXPECTATION_FQ_NAME)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
internal fun createFakeOverrideMember(actualMembers: List<IrDeclaration>, declaration: IrClass): IrOverridableDeclaration<*> {
|
||||||
|
return when (actualMembers.first()) {
|
||||||
|
is IrSimpleFunction -> createFakeOverrideFunction(actualMembers as List<IrSimpleFunction>, declaration)
|
||||||
|
is IrProperty -> createFakeOverrideProperty(actualMembers as List<IrProperty>, declaration)
|
||||||
|
else -> error("Only function or property can be overridden")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun createFakeOverrideProperty(actualProperties: List<IrProperty>, parent: IrClass): IrProperty {
|
||||||
|
val actualProperty = actualProperties.first() // TODO: Currently FIR2IR works in the similar way but it looks incorrect
|
||||||
|
return parent.factory.buildProperty {
|
||||||
|
updateFrom(actualProperty)
|
||||||
|
name = actualProperty.name
|
||||||
|
origin = IrDeclarationOrigin.FAKE_OVERRIDE
|
||||||
|
isFakeOverride = true
|
||||||
|
isExpect = false
|
||||||
|
}.apply {
|
||||||
|
this.parent = parent
|
||||||
|
annotations = actualProperty.annotations
|
||||||
|
backingField = null
|
||||||
|
getter = createFakeOverrideFunction(actualProperties.map { it.getter as IrSimpleFunction }, parent, symbol)
|
||||||
|
setter = runIf(actualProperty.setter != null) {
|
||||||
|
createFakeOverrideFunction(actualProperties.map { it.setter as IrSimpleFunction }, parent, symbol)
|
||||||
|
}
|
||||||
|
overriddenSymbols = actualProperties.map { it.symbol }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun createFakeOverrideFunction(
|
||||||
|
actualFunctions: List<IrSimpleFunction>,
|
||||||
|
parent: IrDeclarationParent,
|
||||||
|
correspondingPropertySymbol: IrPropertySymbol? = null
|
||||||
|
): IrSimpleFunction {
|
||||||
|
val actualFunction = actualFunctions.first() // TODO: Currently FIR2IR works in the similar way but it looks incorrect
|
||||||
|
|
||||||
|
return actualFunction.factory.buildFun {
|
||||||
|
updateFrom(actualFunction)
|
||||||
|
name = actualFunction.name
|
||||||
|
returnType = actualFunction.returnType
|
||||||
|
origin = IrDeclarationOrigin.FAKE_OVERRIDE
|
||||||
|
isFakeOverride = true
|
||||||
|
isExpect = false
|
||||||
|
}.also {
|
||||||
|
it.parent = parent
|
||||||
|
it.annotations = actualFunction.annotations.map { p -> p.deepCopyWithSymbols(it) }
|
||||||
|
it.typeParameters = actualFunction.typeParameters.map { p -> p.deepCopyWithSymbols(it) }
|
||||||
|
|
||||||
|
val typeRemapper = IrTypeParameterRemapper(actualFunction.typeParameters.zip(it.typeParameters).toMap())
|
||||||
|
fun IrValueParameter.deepCopyWithTypeParameters(): IrValueParameter = deepCopyWithSymbols(it) { symbolRemapper, _ ->
|
||||||
|
DeepCopyIrTreeWithSymbols(symbolRemapper, typeRemapper)
|
||||||
|
}
|
||||||
|
|
||||||
|
it.dispatchReceiverParameter = actualFunction.dispatchReceiverParameter?.deepCopyWithTypeParameters()
|
||||||
|
it.extensionReceiverParameter = actualFunction.extensionReceiverParameter?.deepCopyWithTypeParameters()
|
||||||
|
it.valueParameters = actualFunction.valueParameters.map { p -> p.deepCopyWithTypeParameters() }
|
||||||
|
it.contextReceiverParametersCount = actualFunction.contextReceiverParametersCount
|
||||||
|
it.metadata = actualFunction.metadata
|
||||||
|
it.overriddenSymbols = actualFunctions.map { f -> f.symbol }
|
||||||
|
it.attributeOwnerId = it
|
||||||
|
it.correspondingPropertySymbol = correspondingPropertySymbol
|
||||||
|
}
|
||||||
|
}
|
||||||
-147
@@ -1,147 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.backend.common.actualizer
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.KtDiagnosticReporterWithImplicitIrBasedContext
|
|
||||||
import org.jetbrains.kotlin.backend.common.CommonBackendErrors
|
|
||||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
|
|
||||||
import org.jetbrains.kotlin.ir.IrElement
|
|
||||||
import org.jetbrains.kotlin.ir.builders.declarations.buildFun
|
|
||||||
import org.jetbrains.kotlin.ir.builders.declarations.buildProperty
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.impl.IrPropertyImpl
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.types.classifierOrFail
|
|
||||||
import org.jetbrains.kotlin.ir.types.isAny
|
|
||||||
import org.jetbrains.kotlin.ir.util.deepCopyWithSymbols
|
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
|
|
||||||
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
|
||||||
import org.jetbrains.kotlin.name.FqName
|
|
||||||
|
|
||||||
internal class MissingFakeOverridesAdder(
|
|
||||||
private val expectActualMap: Map<IrSymbol, IrSymbol>,
|
|
||||||
private val typeAliasMap: Map<FqName, FqName>,
|
|
||||||
private val diagnosticsReporter: KtDiagnosticReporterWithImplicitIrBasedContext
|
|
||||||
) : IrElementVisitorVoid {
|
|
||||||
override fun visitClass(declaration: IrClass) {
|
|
||||||
if (!declaration.isExpect) {
|
|
||||||
processSupertypes(declaration)
|
|
||||||
}
|
|
||||||
visitElement(declaration)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun visitElement(element: IrElement) {
|
|
||||||
element.acceptChildrenVoid(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun processSupertypes(declaration: IrClass) {
|
|
||||||
val members by lazy(LazyThreadSafetyMode.NONE) {
|
|
||||||
val notBuiltinMembers = declaration.declarations.filterNot { it.isBuiltinMember() }
|
|
||||||
val result = mutableMapOf<String, MutableList<IrDeclaration>>()
|
|
||||||
for (member in notBuiltinMembers) {
|
|
||||||
result.getOrPut(generateIrElementFullNameFromExpect(member, typeAliasMap)) { mutableListOf() }.add(member)
|
|
||||||
}
|
|
||||||
result
|
|
||||||
}
|
|
||||||
|
|
||||||
for (superType in declaration.superTypes) {
|
|
||||||
val expectClass = superType.classifierOrFail.owner as? IrClass ?: continue
|
|
||||||
val added = mutableSetOf<IrDeclaration>()
|
|
||||||
for (expectMember in expectClass.declarations) {
|
|
||||||
if (expectMember.isBuiltinMember()) continue
|
|
||||||
val actualMember = expectActualMap[expectMember.symbol]?.owner as? IrDeclaration ?: continue
|
|
||||||
added += actualMember
|
|
||||||
|
|
||||||
// Do not add FAKE_OVERRIDE if the subclass already has overridden member
|
|
||||||
if (declaration.declarations.filterIsInstance<IrOverridableDeclaration<*>>()
|
|
||||||
.any { expectMember.symbol in it.overriddenSymbols }
|
|
||||||
) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
addFakeOverride(actualMember, members, declaration)
|
|
||||||
}
|
|
||||||
val actualClass = expectActualMap[expectClass.symbol]?.owner as? IrClass ?: continue
|
|
||||||
for (actualMember in actualClass.declarations) {
|
|
||||||
if (actualMember.isBuiltinMember() || actualMember in added) continue
|
|
||||||
if ((actualMember as? IrDeclarationWithVisibility)?.visibility == DescriptorVisibilities.PRIVATE) continue
|
|
||||||
addFakeOverride(actualMember, members, declaration)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun addFakeOverride(
|
|
||||||
actualMember: IrDeclaration,
|
|
||||||
members: MutableMap<String, MutableList<IrDeclaration>>,
|
|
||||||
declaration: IrClass
|
|
||||||
) {
|
|
||||||
val newMember = when (actualMember) {
|
|
||||||
is IrFunctionImpl -> createFakeOverrideFunction(actualMember, declaration)
|
|
||||||
is IrPropertyImpl -> createFakeOverrideProperty(actualMember, declaration)
|
|
||||||
else -> return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members.getMatches(newMember, expectActualMap, typeAliasMap).isEmpty()) {
|
|
||||||
declaration.declarations.add(newMember)
|
|
||||||
members.getOrPut(generateIrElementFullNameFromExpect(newMember, typeAliasMap)) { mutableListOf() }.add(newMember)
|
|
||||||
} else {
|
|
||||||
diagnosticsReporter.at(declaration).report(
|
|
||||||
CommonBackendErrors.MANY_INTERFACES_MEMBER_NOT_IMPLEMENTED,
|
|
||||||
declaration.name.asString(),
|
|
||||||
(actualMember as IrDeclarationWithName).name.asString()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun IrDeclaration.isBuiltinMember(): Boolean {
|
|
||||||
if (this !is IrFunction) return false
|
|
||||||
return this is IrConstructor || dispatchReceiverParameter?.type?.isAny() == true
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun createFakeOverrideProperty(actualMember: IrPropertyImpl, declaration: IrClass) =
|
|
||||||
declaration.factory.buildProperty {
|
|
||||||
updateFrom(actualMember)
|
|
||||||
name = actualMember.name
|
|
||||||
origin = IrDeclarationOrigin.FAKE_OVERRIDE
|
|
||||||
}.apply {
|
|
||||||
parent = declaration
|
|
||||||
annotations = actualMember.annotations
|
|
||||||
backingField = actualMember.backingField
|
|
||||||
getter = (actualMember.getter as? IrFunctionImpl)?.let { getter ->
|
|
||||||
createFakeOverrideFunction(getter, declaration, symbol)
|
|
||||||
}
|
|
||||||
setter = (actualMember.setter as? IrFunctionImpl)?.let { setter ->
|
|
||||||
createFakeOverrideFunction(setter, declaration, symbol)
|
|
||||||
}
|
|
||||||
overriddenSymbols = listOf(actualMember.symbol)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun createFakeOverrideFunction(
|
|
||||||
actualFunction: IrFunctionImpl,
|
|
||||||
parent: IrDeclarationParent,
|
|
||||||
correspondingPropertySymbol: IrPropertySymbol? = null
|
|
||||||
) = actualFunction.factory.buildFun {
|
|
||||||
updateFrom(actualFunction)
|
|
||||||
name = actualFunction.name
|
|
||||||
returnType = actualFunction.returnType
|
|
||||||
origin = IrDeclarationOrigin.FAKE_OVERRIDE
|
|
||||||
isFakeOverride = true
|
|
||||||
isExpect = false
|
|
||||||
}.also {
|
|
||||||
it.parent = parent
|
|
||||||
it.annotations = actualFunction.annotations.map { p -> p.deepCopyWithSymbols(it) }
|
|
||||||
it.typeParameters = actualFunction.typeParameters.map { p -> p.deepCopyWithSymbols(it) }
|
|
||||||
it.dispatchReceiverParameter = actualFunction.dispatchReceiverParameter?.deepCopyWithSymbols(it)
|
|
||||||
it.extensionReceiverParameter = actualFunction.extensionReceiverParameter?.deepCopyWithSymbols(it)
|
|
||||||
it.valueParameters = actualFunction.valueParameters.map { p -> p.deepCopyWithSymbols(it) }
|
|
||||||
it.contextReceiverParametersCount = actualFunction.contextReceiverParametersCount
|
|
||||||
it.metadata = actualFunction.metadata
|
|
||||||
it.overriddenSymbols = listOf(actualFunction.symbol)
|
|
||||||
it.attributeOwnerId = it
|
|
||||||
it.correspondingPropertySymbol = correspondingPropertySymbol
|
|
||||||
}
|
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
// ISSUE: KT-58003
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
class C3 : C2()
|
||||||
|
|
||||||
|
open class C2 : C1()
|
||||||
|
|
||||||
|
expect open class C1() {
|
||||||
|
fun o(): String
|
||||||
|
|
||||||
|
val k: String
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(c3: C3) = c3.o() + c3.k
|
||||||
|
|
||||||
|
// MODULE: platform()()(common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual open class C1 {
|
||||||
|
actual fun o() = "O"
|
||||||
|
|
||||||
|
actual val k = "K"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = foo(C3())
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
// ISSUE: KT-57984
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect interface I {
|
||||||
|
fun ok(): String
|
||||||
|
}
|
||||||
|
interface I2 : I
|
||||||
|
|
||||||
|
fun ok(c: I2) = c.ok()
|
||||||
|
|
||||||
|
// MODULE: lib()()(common)
|
||||||
|
// FILE: lib.kt
|
||||||
|
|
||||||
|
actual interface I {
|
||||||
|
actual fun ok(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
class C : I2 {
|
||||||
|
override fun ok(): String = "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = ok(C())
|
||||||
Vendored
+31
@@ -0,0 +1,31 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
// ISSUE: KT-58004
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect open class A<S>() {
|
||||||
|
fun <T> f(arg: T): T
|
||||||
|
|
||||||
|
fun g(s: S): S
|
||||||
|
|
||||||
|
val <S> S.p: S
|
||||||
|
}
|
||||||
|
|
||||||
|
class B : A<String>()
|
||||||
|
|
||||||
|
fun foo(arg: B) = arg.f("O") + arg.g("K")
|
||||||
|
|
||||||
|
// MODULE: platform()()(common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual open class A<S> {
|
||||||
|
actual fun <T> f(arg: T) = arg
|
||||||
|
|
||||||
|
actual fun g(s: S): S = s.p
|
||||||
|
|
||||||
|
actual val <S> S.p: S get() = this
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = foo(B())
|
||||||
compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt
Vendored
+38
@@ -0,0 +1,38 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
public class X: I1 {
|
||||||
|
override fun <A> f(a: A): A = a
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I1 : I2
|
||||||
|
|
||||||
|
public expect interface I2 {
|
||||||
|
public fun <A> f(a: A): A
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Y<B>: I3<B> {
|
||||||
|
override fun f(b: B): B = b
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface I3<B> : I4<B>
|
||||||
|
|
||||||
|
public expect interface I4<B> {
|
||||||
|
public fun f(b: B): B
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = X().f("O") + Y<String>().f("K")
|
||||||
|
|
||||||
|
// MODULE: platform()()(common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
public actual interface I2 {
|
||||||
|
public actual fun <A> f(a: A): A
|
||||||
|
}
|
||||||
|
|
||||||
|
public actual interface I4<B> {
|
||||||
|
public actual fun f(b: B): B
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
// ISSUE: KT-58124
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
interface I1 {
|
||||||
|
fun f(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
interface I2 {
|
||||||
|
fun f(): String
|
||||||
|
}
|
||||||
|
|
||||||
|
expect class C() : I1, I2
|
||||||
|
|
||||||
|
fun test() = C().f()
|
||||||
|
|
||||||
|
// MODULE: platform()()(common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual class C : I1, I2 {
|
||||||
|
override fun f() = "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = test()
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
class C() : I1, C1()
|
||||||
|
|
||||||
|
expect open class C1() {
|
||||||
|
fun o(): String
|
||||||
|
|
||||||
|
val k: String
|
||||||
|
}
|
||||||
|
|
||||||
|
expect interface I1 {
|
||||||
|
fun o(): String
|
||||||
|
|
||||||
|
val k: String
|
||||||
|
}
|
||||||
|
|
||||||
|
fun f1(x: C1) = x.o()
|
||||||
|
fun f2(x: I1) = x.k
|
||||||
|
|
||||||
|
// MODULE: platform()()(common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual open class C1 {
|
||||||
|
actual fun o() = "O"
|
||||||
|
|
||||||
|
actual val k = "K"
|
||||||
|
}
|
||||||
|
|
||||||
|
actual interface I1 {
|
||||||
|
actual fun o(): String
|
||||||
|
|
||||||
|
actual val k: String
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = f1(C()) + f2(C())
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// TARGET_PLATFORM: Common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect interface S1
|
||||||
|
expect interface S2
|
||||||
|
|
||||||
|
expect interface S : S1, S2
|
||||||
|
|
||||||
|
open class A : S
|
||||||
|
|
||||||
|
class B : A()
|
||||||
|
|
||||||
|
// MODULE: platform()()(common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual interface S1 {
|
||||||
|
fun s1() = "O"
|
||||||
|
}
|
||||||
|
|
||||||
|
interface S20 {
|
||||||
|
fun s2() = "K"
|
||||||
|
}
|
||||||
|
|
||||||
|
actual interface S2 : S20 {
|
||||||
|
}
|
||||||
|
|
||||||
|
actual interface S : S1, S2 {
|
||||||
|
fun s3() = s1() + s2()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = B().s3()
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// TARGET_PLATFORM: Common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
interface I { fun ok(): String }
|
||||||
|
expect open class Base() { fun ok(): String }
|
||||||
|
class Child: Base(), I {}
|
||||||
|
|
||||||
|
fun box() = Base().ok()
|
||||||
|
|
||||||
|
// MODULE: platform()()(common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual open class Base { actual fun ok() = "OK" }
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
// IGNORE_BACKEND_K1: JVM, JVM_IR, JS, JS_IR, JS_IR_ES6, NATIVE
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
class C2 : C1() {
|
||||||
|
override fun o() = super.o()
|
||||||
|
|
||||||
|
override val k = "K"
|
||||||
|
}
|
||||||
|
|
||||||
|
expect open class C1() {
|
||||||
|
open fun o(): String
|
||||||
|
|
||||||
|
open val k: String
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(c2: C2) = c2.o() + c2.k
|
||||||
|
|
||||||
|
// MODULE: platform()()(common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual open class C1 {
|
||||||
|
actual open fun o() = "O"
|
||||||
|
|
||||||
|
actual open val k = "K"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = foo(C2())
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// ISSUE: KT-58153
|
||||||
|
|
||||||
|
// MODULE: m1-common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect open class LockFreeLinkedListNode()
|
||||||
|
|
||||||
|
class NodeList: LockFreeLinkedListNode() {
|
||||||
|
override fun toString(): String = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual open class LockFreeLinkedListNode {
|
||||||
|
override fun toString(): String = ""
|
||||||
|
}
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
// TARGET_BACKEND: JVM
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// TARGET_PLATFORM: Common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect open class C1()
|
||||||
|
expect interface I1
|
||||||
|
|
||||||
|
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED{JVM}!>open class A : C1(), I1<!>
|
||||||
|
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED{JVM}!>open class B : I1, C1()<!>
|
||||||
|
|
||||||
|
expect abstract class C2()
|
||||||
|
expect interface I2
|
||||||
|
|
||||||
|
// TODO: KT-58829
|
||||||
|
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED{JVM}!>class C : C2(), I2<!>
|
||||||
|
|
||||||
|
// MODULE: jvm()()(common)
|
||||||
|
// TARGET_PLATFORM: JVM
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
actual open class C1 {
|
||||||
|
fun f() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual interface I1 {
|
||||||
|
fun f() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual abstract class C2 actual constructor() {
|
||||||
|
fun g() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual interface I2 {
|
||||||
|
fun g()
|
||||||
|
}
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
// TARGET_BACKEND: JVM
|
||||||
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
|
|
||||||
|
// MODULE: common
|
||||||
|
// TARGET_PLATFORM: Common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
expect open class C1()
|
||||||
|
expect interface I1
|
||||||
|
|
||||||
|
open <!MANY_IMPL_MEMBER_NOT_IMPLEMENTED{JVM}!>class A<!> : C1(), I1
|
||||||
|
open <!MANY_IMPL_MEMBER_NOT_IMPLEMENTED{JVM}!>class B<!> : I1, C1()
|
||||||
|
|
||||||
|
expect abstract class C2()
|
||||||
|
expect interface I2
|
||||||
|
|
||||||
|
// TODO: KT-58829
|
||||||
|
class C : C2(), I2
|
||||||
|
|
||||||
|
// MODULE: jvm()()(common)
|
||||||
|
// TARGET_PLATFORM: JVM
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
actual open class C1 {
|
||||||
|
fun f() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual interface I1 {
|
||||||
|
fun f() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual abstract class C2 actual constructor() {
|
||||||
|
fun g() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
actual interface I2 {
|
||||||
|
fun g()
|
||||||
|
}
|
||||||
Vendored
+34
@@ -0,0 +1,34 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// ISSUE: KT-57833
|
||||||
|
|
||||||
|
// MODULE: m1-common
|
||||||
|
// FILE: common.kt
|
||||||
|
|
||||||
|
interface ByteChannel : ByteReadChannel, ByteWriteChannel
|
||||||
|
|
||||||
|
expect interface ByteReadChannel {
|
||||||
|
val isClosedForWrite: Boolean
|
||||||
|
|
||||||
|
fun f()
|
||||||
|
}
|
||||||
|
|
||||||
|
expect interface ByteWriteChannel {
|
||||||
|
val isClosedForWrite: Boolean
|
||||||
|
|
||||||
|
fun f()
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: m2-jvm()()(m1-common)
|
||||||
|
// FILE: platform.kt
|
||||||
|
|
||||||
|
actual interface ByteReadChannel {
|
||||||
|
actual val isClosedForWrite: Boolean
|
||||||
|
|
||||||
|
actual fun f()
|
||||||
|
}
|
||||||
|
|
||||||
|
actual interface ByteWriteChannel {
|
||||||
|
actual val isClosedForWrite: Boolean
|
||||||
|
|
||||||
|
actual fun f()
|
||||||
|
}
|
||||||
Generated
+18
@@ -22324,6 +22324,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/kt54827.kt");
|
runTest("compiler/testData/diagnostics/tests/multiplatform/kt54827.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt58153.kt")
|
||||||
|
public void testKt58153() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/kt58153.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("manyImplMemberNotImplemented.kt")
|
||||||
|
public void testManyImplMemberNotImplemented() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/manyImplMemberNotImplemented.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("manyInterfacesMemberNotImplemented.kt")
|
@TestMetadata("manyInterfacesMemberNotImplemented.kt")
|
||||||
public void testManyInterfacesMemberNotImplemented() throws Exception {
|
public void testManyInterfacesMemberNotImplemented() throws Exception {
|
||||||
@@ -22336,6 +22348,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt");
|
runTest("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("multipleExpectInterfacesImplementation.kt")
|
||||||
|
public void testMultipleExpectInterfacesImplementation() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/multiplatform/multipleExpectInterfacesImplementation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("namedArguments.kt")
|
@TestMetadata("namedArguments.kt")
|
||||||
public void testNamedArguments() throws Exception {
|
public void testNamedArguments() throws Exception {
|
||||||
|
|||||||
+54
@@ -31863,6 +31863,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -31905,6 +31941,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -31929,6 +31971,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -31947,6 +31995,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -33351,6 +33351,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -33399,6 +33435,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -33423,6 +33465,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-51753-1.kt")
|
@TestMetadata("kt-51753-1.kt")
|
||||||
public void testKt_51753_1() throws Exception {
|
public void testKt_51753_1() throws Exception {
|
||||||
@@ -33453,6 +33501,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -33351,6 +33351,42 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -33399,6 +33435,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -33423,6 +33465,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-51753-1.kt")
|
@TestMetadata("kt-51753-1.kt")
|
||||||
public void testKt_51753_1() throws Exception {
|
public void testKt_51753_1() throws Exception {
|
||||||
@@ -33453,6 +33501,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+45
@@ -27112,6 +27112,36 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Basic extends AbstractLightAnalysisModeTest {
|
public static class Basic extends AbstractLightAnalysisModeTest {
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void ignoreExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void ignoreExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void ignoreExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void ignoreExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void ignoreExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void ignoreExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("expectActualNullabilityBasedOverloads.kt")
|
@TestMetadata("expectActualNullabilityBasedOverloads.kt")
|
||||||
public void ignoreExpectActualNullabilityBasedOverloads() throws Exception {
|
public void ignoreExpectActualNullabilityBasedOverloads() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualNullabilityBasedOverloads.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualNullabilityBasedOverloads.kt");
|
||||||
@@ -27127,6 +27157,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/noArgActualConstructor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void ignoreOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void ignoreRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void ignoreRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt");
|
||||||
@@ -27215,6 +27250,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("fakeOverridesInPlatformModule.kt")
|
@TestMetadata("fakeOverridesInPlatformModule.kt")
|
||||||
public void testFakeOverridesInPlatformModule() throws Exception {
|
public void testFakeOverridesInPlatformModule() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/fakeOverridesInPlatformModule.kt");
|
||||||
@@ -27230,6 +27270,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt");
|
||||||
|
|||||||
+54
@@ -23259,6 +23259,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -23301,6 +23337,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -23319,6 +23361,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -23331,6 +23379,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -23409,6 +23409,42 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -23451,6 +23487,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -23469,6 +23511,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -23481,6 +23529,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -23409,6 +23409,42 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -23451,6 +23487,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -23469,6 +23511,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -23481,6 +23529,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -23409,6 +23409,42 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -23451,6 +23487,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -23469,6 +23511,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -23481,6 +23529,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -26499,6 +26499,42 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -26547,6 +26583,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -26565,6 +26607,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -26577,6 +26625,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -27105,6 +27105,42 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -27153,6 +27189,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -27171,6 +27213,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -27183,6 +27231,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -26197,6 +26197,42 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -26245,6 +26281,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -26263,6 +26305,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -26275,6 +26323,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
+54
@@ -26500,6 +26500,42 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
@@ -26548,6 +26584,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
@@ -26566,6 +26608,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
@@ -26578,6 +26626,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
|
|||||||
Generated
+45
@@ -20818,6 +20818,36 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualFakeOverrides2.kt")
|
||||||
|
public void testExpectActualFakeOverrides2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualFakeOverrides3.kt")
|
||||||
|
public void testExpectActualFakeOverrides3() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverrides3.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualFakeOverridesWithTypeParameters2.kt")
|
||||||
|
public void testExpectActualFakeOverridesWithTypeParameters2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualFakeOverridesWithTypeParameters2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualIntersectionOverride.kt")
|
||||||
|
public void testExpectActualIntersectionOverride() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectActualIntersectionOverride2.kt")
|
||||||
|
public void testExpectActualIntersectionOverride2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualIntersectionOverride2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("expectActualMultiCommon.kt")
|
@TestMetadata("expectActualMultiCommon.kt")
|
||||||
public void testExpectActualMultiCommon() throws Exception {
|
public void testExpectActualMultiCommon() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectActualMultiCommon.kt");
|
||||||
@@ -20853,6 +20883,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("expectInterfaceInSupertypes2.kt")
|
||||||
|
public void testExpectInterfaceInSupertypes2() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectInterfaceInSupertypes2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("expectProperty.kt")
|
@TestMetadata("expectProperty.kt")
|
||||||
public void testExpectProperty() throws Exception {
|
public void testExpectProperty() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/expectProperty.kt");
|
||||||
@@ -20868,6 +20903,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/independentCommonSourceModules.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt")
|
||||||
|
public void testInterfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/interfaceMethodFromSuperTypeIsImplementedInOtherExpectSuperClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt-56329.kt")
|
@TestMetadata("kt-56329.kt")
|
||||||
public void testKt_56329() throws Exception {
|
public void testKt_56329() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/kt-56329.kt");
|
||||||
@@ -20878,6 +20918,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/nonExternalEquals.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("overridesOfExpectMembers.kt")
|
||||||
|
public void testOverridesOfExpectMembers() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/overridesOfExpectMembers.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
@TestMetadata("removeExpectDeclarationsFromMetadata.kt")
|
||||||
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
public void testRemoveExpectDeclarationsFromMetadata() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/k2/basic/removeExpectDeclarationsFromMetadata.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user