diff --git a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt index 9d4acfabd60..073391fe6cb 100644 --- a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt +++ b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt @@ -1,8 +1,5 @@ // TARGET_BACKEND: JVM -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57788: Fix computing mangled names of types with @EnhancedNullability from IR-based declaration descriptors - // FILE: implicitNotNullOnDelegatedImplementation.kt interface IFoo { fun foo(): String diff --git a/compiler/testData/ir/irText/classes/kt43217.kt b/compiler/testData/ir/irText/classes/kt43217.kt index 4245bf89e5f..3d507de4cd0 100644 --- a/compiler/testData/ir/irText/classes/kt43217.kt +++ b/compiler/testData/ir/irText/classes/kt43217.kt @@ -1,8 +1,5 @@ // TARGET_BACKEND: JVM -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57788: Fix computing mangled names of types with @EnhancedNullability from IR-based declaration descriptors - // FILE: kt43217.kt class A { private val b = diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt index cfec8e32228..e381b995335 100644 --- a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt @@ -1,13 +1,7 @@ +// TARGET_BACKEND: JVM // WITH_STDLIB // FULL_JDK // JVM_TARGET: 1.8 -// IGNORE_BACKEND: JS_IR - -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR JS_IR NATIVE -// ^ KT-57788: Fix computing mangled names of types with @EnhancedNullability from IR-based declaration descriptors - -// KT-61141: ImplicitReceiverStack & PersistentImplicitReceiverStack miss fake overrides `forEach` & `spliterator` -// IGNORE_BACKEND: NATIVE interface SymbolOwner> diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt index f2f1dfe4388..3f33584bbac 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt @@ -15,6 +15,7 @@ import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.fir.backend.FirMangler import org.jetbrains.kotlin.fir.backend.FirMetadataSource +import org.jetbrains.kotlin.fir.declarations.FirDeclaration import org.jetbrains.kotlin.ir.IrBuiltIns import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI @@ -226,14 +227,13 @@ class IrMangledNameAndSignatureDumpHandler( addSignatureTo(signatures, symbol.signature, ComputedBy.FE, isPublic = true) addSignatureTo(signatures, symbol.privateSignature, ComputedBy.FE, isPublic = false) - descriptorMangler.addSignatureMangledNameTo(signatureMangledNames, symbol.descriptor) - - ((declaration as? IrMetadataSourceOwner)?.metadata as? FirMetadataSource)?.fir?.let { - firMangler?.addSignatureMangledNameTo( - signatureMangledNames, - it - ) - } + val firDeclaration: FirDeclaration? = ((declaration as? IrMetadataSourceOwner)?.metadata as? FirMetadataSource)?.fir + if (firDeclaration != null) { + // Dump only FIR-based signature mangled names if there is FIR available. In this mode no descriptors are used + // for computing signature mangled names. + firMangler?.addSignatureMangledNameTo(signatureMangledNames, firDeclaration) + } else + descriptorMangler.addSignatureMangledNameTo(signatureMangledNames, symbol.descriptor) } fun printActualMangledNamesAndSignatures() { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java index 6bd24dd9a4f..8605ff69242 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java @@ -2124,11 +2124,6 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); } - @TestMetadata("ImplicitReceiverStack.kt") - public void testImplicitReceiverStack() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); - } - @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { runTest("compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java index 0b59e556bcb..b79658dae75 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java @@ -2386,12 +2386,6 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); } - @Test - @TestMetadata("ImplicitReceiverStack.kt") - public void testImplicitReceiverStack() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); - } - @Test @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java index db8e6ec075b..8bfef4f007e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java @@ -2386,12 +2386,6 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); } - @Test - @TestMetadata("ImplicitReceiverStack.kt") - public void testImplicitReceiverStack() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); - } - @Test @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java index eeee6ae6a77..f133195def0 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java @@ -2386,12 +2386,6 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); } - @Test - @TestMetadata("ImplicitReceiverStack.kt") - public void testImplicitReceiverStack() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); - } - @Test @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java index 5bf4b310a08..7f04bb9d618 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java @@ -2392,12 +2392,6 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); } - @Test - @TestMetadata("ImplicitReceiverStack.kt") - public void testImplicitReceiverStack() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); - } - @Test @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java index 2c0cdd5fb36..75453aef47c 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java @@ -2392,12 +2392,6 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); } - @Test - @TestMetadata("ImplicitReceiverStack.kt") - public void testImplicitReceiverStack() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); - } - @Test @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java index a4d0938c1d0..d5a929c0398 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java @@ -2392,12 +2392,6 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); } - @Test - @TestMetadata("ImplicitReceiverStack.kt") - public void testImplicitReceiverStack() throws Exception { - runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); - } - @Test @TestMetadata("inapplicableCollectionSet.kt") public void testInapplicableCollectionSet() throws Exception {