Skip to content

Commit b4e6f92

Browse files
committed
rearange ArrayIndexingStep to avoid #shared predicate
1 parent 6213c20 commit b4e6f92

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

javascript/ql/src/semmle/javascript/Arrays.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,8 @@ private module ArrayDataFlow {
156156

157157
ArrayIndexingStep() {
158158
read = this and
159-
forex(InferredType type | type = read.getPropertyNameExpr().flow().analyze().getAType() |
160-
type = TTNumber()
161-
) and
159+
TTNumber() =
160+
unique(InferredType type | type = read.getPropertyNameExpr().flow().analyze().getAType()) and
162161
exists(VarAccess i, ExprOrVarDecl init |
163162
i = read.getPropertyNameExpr() and init = any(ForStmt f).getInit()
164163
|

0 commit comments

Comments
 (0)