diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.kt index 80d58563e91..8d500c8e3cc 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.kt @@ -19,10 +19,7 @@ class Fir2IrCommonMemberStorage( ) { val firSignatureComposer = FirBasedSignatureComposer(firMangler) - val symbolTable = SymbolTable( - signaturer = WrappedDescriptorSignatureComposer(signatureComposer, firSignatureComposer), - irFactory = IrFactoryImpl - ) + val symbolTable = SymbolTable(signaturer = signatureComposer, irFactory = IrFactoryImpl) val classCache: MutableMap = mutableMapOf() diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/WrappedDescriptorSignatureComposer.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/WrappedDescriptorSignatureComposer.kt deleted file mode 100644 index 674e7bbbf45..00000000000 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/WrappedDescriptorSignatureComposer.kt +++ /dev/null @@ -1,21 +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.fir.backend - -import org.jetbrains.kotlin.fir.signaturer.FirBasedSignatureComposer -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.ir.util.IdSignatureComposer - -class WrappedDescriptorSignatureComposer( - private val delegate: IdSignatureComposer, - private val firComposer: FirBasedSignatureComposer -) : IdSignatureComposer by delegate { - override fun withFileSignature(fileSignature: IdSignature.FileSignature, body: () -> Unit) { - firComposer.withFileSignature(fileSignature) { - delegate.withFileSignature(fileSignature, body) - } - } -} diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/signaturer/FirBasedSignatureComposer.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/signaturer/FirBasedSignatureComposer.kt index 0ea12323f51..badccd50810 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/signaturer/FirBasedSignatureComposer.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/signaturer/FirBasedSignatureComposer.kt @@ -23,14 +23,6 @@ import org.jetbrains.kotlin.name.FqName // @NoMutableState -- we'll restore this annotation once we get rid of withFileSignature(). class FirBasedSignatureComposer(val mangler: FirMangler) { - private var fileSignature: IdSignature.FileSignature? = null - - fun withFileSignature(sig: IdSignature.FileSignature, body: () -> Unit) { - fileSignature = sig - body() - fileSignature = null - } - private data class FirDeclarationWithParentId(val declaration: FirDeclaration, val classId: ClassId?, val forceExpect: Boolean) private val signatureCache = mutableMapOf() @@ -123,7 +115,7 @@ class FirBasedSignatureComposer(val mangler: FirMangler) { } val resultSignature: IdSignature = if (isTopLevelPrivate(declaration)) { - val fileSig = fileSignature ?: declaration.fakeFileSignature(publicSignature) + val fileSig = declaration.fakeFileSignature(publicSignature) IdSignature.CompositeSignature(fileSig, publicSignature) } else publicSignature