mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Fix calls to static methods defined in association with local functions
These are a bit weird since they involve static calls to unnamed synthetic class members, but while unwriteable as Java they ought to work as a database description.
This commit is contained in:
@@ -1726,7 +1726,7 @@ open class KotlinFileExtractor(
|
||||
val id = extractMethodAccessWithoutArgs(callsite.type, locId, enclosingCallable, callsiteParent, childIdx, enclosingStmt, defaultMethodLabel)
|
||||
|
||||
if (callTarget.isLocalFunction()) {
|
||||
extractNewExprForLocalFunction(getLocallyVisibleFunctionLabels(callTarget), id, locId, enclosingCallable, enclosingStmt)
|
||||
extractTypeAccess(getLocallyVisibleFunctionLabels(callTarget).type, locId, id, -1, enclosingCallable, enclosingStmt)
|
||||
} else {
|
||||
extractStaticTypeAccessQualifierUnchecked(callTarget.parent, id, locId, enclosingCallable, enclosingStmt)
|
||||
}
|
||||
|
||||
@@ -568,8 +568,7 @@ test.kt:
|
||||
# 90| 5: [BlockStmt] { ... }
|
||||
# 91| 0: [ExprStmt] <Expr>;
|
||||
# 91| 0: [MethodAccess] f$default(...)
|
||||
# 91| -1: [ClassInstanceExpr] new (...)
|
||||
# 91| -3: [TypeAccess] Object
|
||||
# 91| -1: [TypeAccess]
|
||||
# 91| 0: [StringLiteral] local sunk
|
||||
# 1| 1: [NullLiteral] null
|
||||
# 1| 2: [NullLiteral] null
|
||||
@@ -577,8 +576,7 @@ test.kt:
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 92| 1: [ExprStmt] <Expr>;
|
||||
# 92| 0: [MethodAccess] f$default(...)
|
||||
# 92| -1: [ClassInstanceExpr] new (...)
|
||||
# 92| -3: [TypeAccess] Object
|
||||
# 92| -1: [TypeAccess]
|
||||
# 92| 0: [StringLiteral] local sunk fp
|
||||
# 92| 1: [StringLiteral] local sunk 2
|
||||
# 1| 2: [NullLiteral] null
|
||||
|
||||
Reference in New Issue
Block a user