diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/LegacyDescriptorUtils.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/LegacyDescriptorUtils.kt index d61eaa7d0d8..8671e2cf76e 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/LegacyDescriptorUtils.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/LegacyDescriptorUtils.kt @@ -56,7 +56,7 @@ val ModuleDescriptor.isForwardDeclarationModule get() = private fun sourceByIndex(descriptor: CallableMemberDescriptor, index: Int): SourceFile { val fragment = descriptor.findPackage() as KlibMetadataDeserializedPackageFragment val fileName = fragment.proto.strings.stringList[index] - return DeserializedSourceFile(fileName, index, descriptor.module.kotlinLibrary) + return DeserializedSourceFile(fileName, descriptor.module.kotlinLibrary) } fun CallableMemberDescriptor.findSourceFile(): SourceFile { diff --git a/compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/DeserializedSourceFile.kt b/compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/DeserializedSourceFile.kt index f5efea4f49a..6036a6ae415 100644 --- a/compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/DeserializedSourceFile.kt +++ b/compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/DeserializedSourceFile.kt @@ -8,15 +8,15 @@ import org.jetbrains.kotlin.descriptors.SourceFile import org.jetbrains.kotlin.library.KotlinLibrary class DeserializedSourceFile( - val name_: String, val index: Int, val library: KotlinLibrary + val name_: String, val library: KotlinLibrary ) : SourceFile { override fun getName(): String? = name_ override fun equals(other: Any?): Boolean { - return other is DeserializedSourceFile && library == other.library && index == other.index + return other is DeserializedSourceFile && library == other.library && name == other.name } override fun hashCode(): Int { - return library.hashCode() xor index + return library.hashCode() xor name.hashCode() } } \ No newline at end of file