joern
joern copied to clipboard
[Bug] Kotlin2Cpg - Incorrect TypeFullName in TypeDecl's inheritsFromTypeFullName
Describe the bug
In kotlin2Cpg frontend the typeFullName
for inheritsFromTypeFullName
is set incorrectly
To Reproduce Steps to reproduce the behavior:
- Clone the repo - https://github.com/pagopa/pagopa-wallet-service.git
- importCode("pagopa-wallet-service")
- run the query
cpg.typeDecl("WalletRepository").l
-
inheritsFromTypeFullName = ArraySeq("ReactiveCrudRepository<Wallet, String>")
Expected behavior
The expected TypeFullName is org.springframework.data.repository.reactive.ReactiveCrudRepository.ReactiveCrudRepository<Wallet, String>
Screenshots
joern> cpg.typeDecl("WalletRepository").l
val res1: List[io.shiftleft.codepropertygraph.generated.nodes.TypeDecl] = List(
TypeDecl(
id = 7772L,
aliasTypeFullName = None,
astParentFullName = "",
astParentType = "",
code = "WalletRepository",
columnNumber = Some(value = 10),
filename = "src/main/kotlin/it/pagopa/wallet/repositories/WalletRepository.kt",
fullName = "it.pagopa.wallet.repositories.WalletRepository",
inheritsFromTypeFullName = ArraySeq("ReactiveCrudRepository<Wallet, String>"),
isExternal = false,
lineNumber = Some(value = 10),
name = "WalletRepository",
offset = None,
offsetEnd = None,
order = 1
)
)