Skip to content

Commit 8fd4041

Browse files
committed
Kotlin: always populate the files table
Previously individual top-level file declarations relied on their corresponding file-class to declare their `File` instance, but this can be scuppered by a Java extractor replacing that file-class and identifying a different file location.
1 parent 418d632 commit 8fd4041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/kotlin-extractor/src/main/kotlin/ExternalDeclExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class ExternalDeclExtractor(val logger: FileLogger, val invocationTrapFile: Stri
8080
}
8181
// Now elevate to a SourceFileTrapWriter, and populate the
8282
// file information if needed:
83-
val ftw = tw.makeFileTrapWriter(binaryPath, irDecl is IrClass)
83+
val ftw = tw.makeFileTrapWriter(binaryPath, true)
8484

8585
val fileExtractor = KotlinFileExtractor(logger, ftw, null, binaryPath, manager, this, primitiveTypeMapping, pluginContext, KotlinFileExtractor.DeclarationStack(), globalExtensionState)
8686

0 commit comments

Comments
 (0)