Kotlin: Fix comment extraction for anonymous objects

This commit is contained in:
Tamas Vajk
2022-09-21 15:57:22 +02:00
parent 7927e1dcd4
commit 633f99df6c
3 changed files with 20 additions and 1 deletions

View File

@@ -461,6 +461,14 @@ open class KotlinUsesExtractor(
)
}
fun getExistingAnonymousClassLabel(c: IrClass): Label<out DbType>? {
if (!c.isAnonymousObject){
return null
}
return tw.lm.anonymousTypeMapping[c]?.javaResult?.id
}
fun fakeKotlinType(): Label<out DbKt_type> {
val fakeKotlinPackageId: Label<DbPackage> = tw.getLabelFor("@\"FakeKotlinPackage\"", {
tw.writePackages(it, "fake.kotlin")