Fix stub mismatch for top level declaration with JvmPackageName (KT-21831)
ClassId stores jvm name and it differs from kotlin name in that case. #KT-21831 Fixed
This commit is contained in:
+2
-1
@@ -56,7 +56,8 @@ open class KotlinClsStubBuilder : ClsStubBuilder() {
|
||||
val kotlinClass = IDEKotlinBinaryClassCache.getKotlinBinaryClass(file, fileContent) ?: error("Can't find binary class for Kotlin file: $file")
|
||||
val header = kotlinClass.classHeader
|
||||
val classId = kotlinClass.classId
|
||||
val packageFqName = classId.packageFqName
|
||||
val packageFqName = header.packageName?.let { FqName(it) } ?: classId.packageFqName
|
||||
|
||||
if (!header.metadataVersion.isCompatible()) {
|
||||
return createIncompatibleAbiVersionFileStub()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user