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.
This commit is contained in:
Ian Lynagh
2023-07-11 13:50:26 +01:00
parent cfd29de677
commit 6dedd9286c
2 changed files with 5 additions and 1 deletions

View File

@@ -643,6 +643,10 @@ open class KotlinFileExtractor(
logger.warnElement("Unrecognised class kind $kind", c)
}
if (c.origin == IrDeclarationOrigin.FILE_CLASS) {
tw.writeFile_class(id)
}
if (c.isData) {
tw.writeKtDataClasses(id)
}

View File

@@ -1,3 +1,3 @@
| AKt.class:0:0:0:0 | AKt | false |
| AKt.class:0:0:0:0 | AKt | true |
| B.kt:0:0:0:0 | BKt | true |
| C.kt:1:1:3:1 | C | false |