mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Kotlin: Allow comments on enum entries
This commit is contained in:
@@ -45,6 +45,7 @@ open class KotlinFileExtractor(
|
||||
is IrValueParameter -> return getValueParameterLabel(element)
|
||||
is IrProperty -> return getPropertyLabel(element)
|
||||
is IrField -> return getFieldLabel(element)
|
||||
is IrEnumEntry -> return getEnumEntryLabel(element)
|
||||
|
||||
// Fresh entities:
|
||||
is IrBody -> return null
|
||||
|
||||
@@ -656,7 +656,7 @@ class X {
|
||||
fun useProperty(p: IrProperty): Label<out DbKt_property> =
|
||||
tw.getLabelFor(getPropertyLabel(p))
|
||||
|
||||
private fun getEnumEntryLabel(ee: IrEnumEntry): String {
|
||||
fun getEnumEntryLabel(ee: IrEnumEntry): String {
|
||||
val parentId = useDeclarationParent(ee.parent)
|
||||
return "@\"field;{$parentId};${ee.name.asString()}\""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user