Merge pull request #10129 from tamasvajk/kotlin-fix-comment-type-alias

Kotlin: Extract type alias doc comments
This commit is contained in:
Tamás Vajk
2022-08-22 16:10:50 +02:00
committed by GitHub
4 changed files with 11 additions and 1 deletions

View File

@@ -170,6 +170,7 @@ open class KotlinFileExtractor(
is IrProperty -> return getPropertyLabel(element)
is IrField -> return getFieldLabel(element)
is IrEnumEntry -> return getEnumEntryLabel(element)
is IrTypeAlias -> return getTypeAliasLabel(element)
// Fresh entities:
is IrBody -> return null

View File

@@ -1574,7 +1574,7 @@ open class KotlinUsesExtractor(
fun useEnumEntry(ee: IrEnumEntry): Label<out DbField> =
tw.getLabelFor(getEnumEntryLabel(ee))
private fun getTypeAliasLabel(ta: IrTypeAlias): String {
fun getTypeAliasLabel(ta: IrTypeAlias): String {
val parentId = useDeclarationParent(ta.parent, true)
return "@\"type_alias;{$parentId};${ta.name.asString()}\""
}