mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
Kotlin: drop same-file requirement for overridden parameter labels
This commit is contained in:
@@ -1622,12 +1622,7 @@ open class KotlinUsesExtractor(
|
||||
fun getValueParameterLabel(vp: IrValueParameter, parent: Label<out DbCallable>?): String {
|
||||
val declarationParent = vp.parent
|
||||
val overriddenParentAttributes = (declarationParent as? IrFunction)?.let {
|
||||
// Note the check 'vp.fileOrNull?.path == this.filePath' should never actually do anything, since references
|
||||
// to a value parameter should always come from within the same .kt file.
|
||||
if (this is KotlinFileExtractor && vp.fileOrNull?.path == this.filePath)
|
||||
this.declarationStack.findOverriddenAttributes(it)
|
||||
else
|
||||
null
|
||||
(this as? KotlinFileExtractor)?.declarationStack?.findOverriddenAttributes(it)
|
||||
}
|
||||
val parentId = parent ?: overriddenParentAttributes?.id ?: useDeclarationParent(declarationParent, false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user