File tree Expand file tree Collapse file tree
java/kotlin-extractor/src/main/kotlin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2525,12 +2525,11 @@ open class KotlinFileExtractor(
25252525 }
25262526
25272527 if (parent is IrFile ) {
2528- if (this .filePath == parent.path) {
2529- val fileId = extractFileClass(parent)
2530- tw.writeEnclInReftype(id, fileId)
2531- } else {
2528+ if (this .filePath != parent.path) {
25322529 logger.warn(Severity .ErrorSevere , " Unexpected file parent found" )
25332530 }
2531+ val fileId = extractFileClass(parent)
2532+ tw.writeEnclInReftype(id, fileId)
25342533 break
25352534 }
25362535
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ open class KotlinUsesExtractor(
116116 /* *
117117 * Gets a KotlinFileExtractor based on this one, except it attributes locations to the file that declares the given class.
118118 */
119- private fun withSourceFileOfClass (cls : IrClass ): KotlinFileExtractor {
119+ private fun withFileOfClass (cls : IrClass ): KotlinFileExtractor {
120120 val clsFile = cls.fileOrNull
121121
122122 if (isExternalDeclaration(cls) || clsFile == null ) {
@@ -252,7 +252,7 @@ open class KotlinUsesExtractor(
252252 if (argsIncludingOuterClasses == null || argsIncludingOuterClasses.isNotEmpty()) {
253253 // If this is a generic type instantiation or a raw type then it has no
254254 // source entity, so we need to extract it here
255- val extractorWithCSource by lazy { this .withSourceFileOfClass (c) }
255+ val extractorWithCSource by lazy { this .withFileOfClass (c) }
256256
257257 if (! instanceSeenBefore) {
258258 extractorWithCSource.extractClassInstance(c, argsIncludingOuterClasses)
You can’t perform that action at this time.
0 commit comments