mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Extract enum field declarations
This commit is contained in:
@@ -830,6 +830,15 @@ open class KotlinFileExtractor(
|
||||
tw.writeFieldsKotlinType(id, type.kotlinResult.id)
|
||||
val locId = tw.getLocation(ee)
|
||||
tw.writeHasLocation(id, locId)
|
||||
|
||||
if (!isExternalDeclaration(ee)) {
|
||||
val fieldDeclarationId = tw.getFreshIdLabel<DbFielddecl>()
|
||||
tw.writeFielddecls(fieldDeclarationId, parentId)
|
||||
tw.writeFieldDeclaredIn(id, fieldDeclarationId, 0)
|
||||
tw.writeHasLocation(fieldDeclarationId, locId)
|
||||
|
||||
extractTypeAccess(type, locId, fieldDeclarationId, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,12 @@ A.kt:
|
||||
# 23| -3: [TypeAccess] Unit
|
||||
# 23| 0: [TypeAccess] Enu
|
||||
# 23| 1: [BlockStmt] { ... }
|
||||
# 24| 4: [FieldDeclaration] Enu A;
|
||||
# 24| -1: [TypeAccess] Enu
|
||||
# 24| 5: [FieldDeclaration] Enu B;
|
||||
# 24| -1: [TypeAccess] Enu
|
||||
# 24| 6: [FieldDeclaration] Enu C;
|
||||
# 24| -1: [TypeAccess] Enu
|
||||
B.java:
|
||||
# 0| [CompilationUnit] B
|
||||
# 1| 1: [Class] B
|
||||
|
||||
Reference in New Issue
Block a user