Merge pull request #10520 from tamasvajk/kotlin-fix-anonymous-object-comment

Kotlin: Fix comment extraction for anonymous objects
This commit is contained in:
Tamás Vajk
2022-09-27 12:42:05 +02:00
committed by GitHub
4 changed files with 34 additions and 2 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")