mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
JS: Remove unused getFallbackTypeAnnotation()
This private predicate was unused, but due to its recursive self-reference it was not reported as an unused predicate.
This commit is contained in:
@@ -192,26 +192,6 @@ module DataFlow {
|
||||
FlowSteps::identityFunctionStep(result, this)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the type annotation describing the type of this node,
|
||||
* provided that a static type could not be found.
|
||||
*
|
||||
* Doesn't take field types and function return types into account.
|
||||
*/
|
||||
private TypeAnnotation getFallbackTypeAnnotation() {
|
||||
exists(BindingPattern pattern |
|
||||
this = valueNode(pattern) and
|
||||
result = pattern.getTypeAnnotation()
|
||||
)
|
||||
or
|
||||
result = this.getAPredecessor().getFallbackTypeAnnotation()
|
||||
or
|
||||
exists(DataFlow::ClassNode cls, string fieldName |
|
||||
this = cls.getAReceiverNode().getAPropertyRead(fieldName) and
|
||||
result = cls.getFieldTypeAnnotation(fieldName)
|
||||
)
|
||||
}
|
||||
|
||||
private NameResolution::Node getNameResolutionNode() {
|
||||
this = valueNode(result)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user