From 51a37bffffd1d2e67ac3232d343871a98f3de716 Mon Sep 17 00:00:00 2001 From: Vladimir Ilmov Date: Thu, 10 Sep 2020 14:48:21 +0200 Subject: [PATCH] Incorrect package name for multipart classes --- .../src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt | 2 +- .../kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt index 07f037345b3..76c605c3f31 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt @@ -29,7 +29,7 @@ object KotlinStubVersions { // or changes are made to the core stub building code (org.jetbrains.kotlin.idea.decompiler.stubBuilder). // Increasing this version will lead to reindexing of all binary files that are potentially kotlin binaries (including all class files). // TODO: Before updating this, please see the kdoc at DeserializedMemberScope.computeDescriptors and KT-41859 - private const val BINARY_STUB_VERSION = 71 + private const val BINARY_STUB_VERSION = 72 // Classfile stub version should be increased if changes are made to classfile stub building subsystem (org.jetbrains.kotlin.idea.decompiler.classFile) // Increasing this version will lead to reindexing of all classfiles. diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt index c2b895f5b21..0495951abaa 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt @@ -78,7 +78,7 @@ fun createMultifileClassStub( facadeFqName: FqName, components: ClsStubBuilderComponents ): KotlinFileStubImpl { - val packageFqName = facadeFqName.parent() + val packageFqName = header.packageName?.let { FqName(it) } ?: facadeFqName.parent() val partNames = header.data?.asList()?.map { it.substringAfterLast('/') } val fileStub = KotlinFileStubForIde.forMultifileClassStub(facadeFqName, partNames) setupFileStub(fileStub, packageFqName)