diff --git a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.sig.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.sig.kt.txt index 377ed075b46..51a21f4f66f 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/k2/expectMemberInNotExpectClass.sig.kt.txt @@ -12,7 +12,6 @@ class C2 : C1 { // CHECK JVM_IR: // Mangled name: C2#f(){}kotlin.String - // Mangled name for the signature: f(){}kotlin.String // Public signature: /C2.f|9098388873611041001[0] // Public signature debug description: f(){}kotlin.String // CHECK JS_IR NATIVE: @@ -23,7 +22,6 @@ class C2 : C1 { // CHECK JVM_IR: // Mangled name: C2{}p - // Mangled name for the signature: {}p // Public signature: /C2.p|6715504260787941082[0] // Public signature debug description: {}p // CHECK JS_IR NATIVE: @@ -33,7 +31,6 @@ class C2 : C1 { /* fake */ override val p: Int // CHECK JVM_IR: // Mangled name: C2#(){}kotlin.Int - // Mangled name for the signature: (){}kotlin.Int // Public signature: /C2.p.|5329635969197638839[0] // Public signature debug description: (){}kotlin.Int // CHECK JS_IR NATIVE: 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 fcb4cf69de5..ac3505ab569 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 @@ -223,13 +223,10 @@ class IrMangledNameAndSignatureDumpHandler( val fullMangledNames = mutableListOf() val signatureMangledNames = mutableListOf() - signatureComposer.inFile(declaration.fileOrNull?.symbol) { - addSignatureTo( - signatures, - signatureComposer.computeSignature(declaration), - ComputedBy.IR, - isPublic = true - ) + val signatureComputedFromIr = signatureComposer.inFile(declaration.fileOrNull?.symbol) { + signatureComposer.computeSignature(declaration).also { + addSignatureTo(signatures, it, ComputedBy.IR, isPublic = true) + } } irMangler.addFullMangledNameTo(fullMangledNames, declaration) @@ -255,7 +252,7 @@ class IrMangledNameAndSignatureDumpHandler( // Signature mangled names computed from descriptors, IR and FIR of declarations that are not // effectively private must be all equal to the signature description, which we already print // (see the printSignatures() function below). If this is not the case, print them separately. - if (signatureMangledNames.any { it.value != symbol.signature?.asPublic()?.description.orEmpty() }) { + if (signatureMangledNames.any { it.value != signatureComputedFromIr.asPublic()?.description.orEmpty() }) { printMangledNames(signatureMangledNames, prefix = "Mangled name for the signature") } }