Skip to content

Commit 6dedd92

Browse files
committed
Kotlin: Record "file class" info from the compiler
We were making file classes when the parent was a file, but not when it was a class marked as one.
1 parent cfd29de commit 6dedd92

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,10 @@ open class KotlinFileExtractor(
643643
logger.warnElement("Unrecognised class kind $kind", c)
644644
}
645645

646+
if (c.origin == IrDeclarationOrigin.FILE_CLASS) {
647+
tw.writeFile_class(id)
648+
}
649+
646650
if (c.isData) {
647651
tw.writeKtDataClasses(id)
648652
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| AKt.class:0:0:0:0 | AKt | false |
1+
| AKt.class:0:0:0:0 | AKt | true |
22
| B.kt:0:0:0:0 | BKt | true |
33
| C.kt:1:1:3:1 | C | false |

0 commit comments

Comments
 (0)