add explicit this

This commit is contained in:
Erik Krogh Kristensen
2022-05-24 10:59:13 +02:00
parent d1ad08ecb5
commit d58fe8e193
4 changed files with 19 additions and 19 deletions

View File

@@ -84,8 +84,8 @@ class Assertion extends Comment {
string tryExplainFailure() {
exists(int i, API::Node nd, string prefix, string suffix |
nd = this.lookup(i) and
i < getPathLength() and
not exists(this.lookup([i + 1 .. getPathLength()])) and
i < this.getPathLength() and
not exists(this.lookup([i + 1 .. this.getPathLength()])) and
prefix = nd + " has no outgoing edge labelled " + this.getEdgeLabel(i) + ";" and
if exists(nd.getASuccessor())
then

View File

@@ -42,16 +42,16 @@ class AnnotatedCall extends DataFlow::Node {
string getCallTargetName() { result = calls }
AnnotatedFunction getAnExpectedCallee(string kind_) {
result.getCalleeName() = getCallTargetName() and
result.getCalleeName() = this.getCallTargetName() and
kind = kind_
}
int getBoundArgs() { result = getAnnotation(this.getAstNode(), "boundArgs").toInt() }
int getBoundArgsOrMinusOne() {
result = getBoundArgs()
result = this.getBoundArgs()
or
not exists(getBoundArgs()) and
not exists(this.getBoundArgs()) and
result = -1
}