mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Prevent extracting hidden functions
I'm not sure how these looked in 1.6 and below yet, but in 1.7 they appear with visibility = public, but a descriptor field set to indicate they have a name clash with a 'real' function.
This commit is contained in:
@@ -86,6 +86,7 @@ open class KotlinFileExtractor(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ObsoleteDescriptorBasedAPI::class)
|
||||
private fun isFake(d: IrDeclarationWithVisibility): Boolean {
|
||||
val visibility = d.visibility
|
||||
if (visibility is DelegatedDescriptorVisibility && visibility.delegate == Visibilities.InvisibleFake) {
|
||||
@@ -94,6 +95,9 @@ open class KotlinFileExtractor(
|
||||
if (d.isFakeOverride) {
|
||||
return true
|
||||
}
|
||||
if ((d as? IrFunction)?.descriptor?.isHiddenToOvercomeSignatureClash == true) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user