KotlinClsStubBuilder: fix reading header for multifile facades
This commit is contained in:
+5
-4
@@ -60,6 +60,11 @@ public open class KotlinClsStubBuilder : ClsStubBuilder() {
|
||||
}
|
||||
|
||||
val components = createStubBuilderComponents(file, packageFqName)
|
||||
if (header.isCompatibleMultifileClassKind()) {
|
||||
val partHeaders = readMultifileClassPartHeaders(file, kotlinBinaryClass)
|
||||
return createMultifileClassStub(partHeaders, classId.asSingleFqName(), components)
|
||||
}
|
||||
|
||||
val annotationData = header.annotationData
|
||||
if (annotationData == null) {
|
||||
LOG.error("Corrupted kotlin header for file ${file.getName()}")
|
||||
@@ -82,10 +87,6 @@ public open class KotlinClsStubBuilder : ClsStubBuilder() {
|
||||
val context = components.createContext(packageData.getNameResolver(), packageFqName)
|
||||
createFileFacadeStub(packageData.getPackageProto(), classId.asSingleFqName(), context)
|
||||
}
|
||||
header.isCompatibleMultifileClassKind() -> {
|
||||
val partHeaders = readMultifileClassPartHeaders(file, kotlinBinaryClass)
|
||||
createMultifileClassStub(partHeaders, classId.asSingleFqName(), components)
|
||||
}
|
||||
else -> throw IllegalStateException("Should have processed " + file.getPath() + " with header $header")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user