mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
When calling a $default method, ensure the real method gets extracted
This commit is contained in:
@@ -1718,6 +1718,10 @@ open class KotlinFileExtractor(
|
||||
extensionReceiver: IrExpression?
|
||||
) {
|
||||
val callTarget = syntacticCallTarget.target.realOverrideTarget
|
||||
if (isExternalDeclaration(callTarget)) {
|
||||
// Ensure the real target gets extracted, as we might not every directly touch it thanks to this call being redirected to a $default method.
|
||||
useFunction<DbCallable>(callTarget)
|
||||
}
|
||||
val defaultMethodLabel = getDefaultsMethodLabel(callTarget)
|
||||
val id = extractMethodAccessWithoutArgs(callsite.type, locId, enclosingCallable, callsiteParent, childIdx, enclosingStmt, defaultMethodLabel)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user