We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4cc6a07 + 99f5dca commit 2d9b249Copy full SHA for 2d9b249
java/ql/src/Likely Bugs/Arithmetic/ConstantExpAppearsNonConstant.ql
@@ -19,7 +19,7 @@ predicate isConstantExp(Expr e) {
19
// A literal is constant.
20
e instanceof Literal
21
or
22
- e instanceof TypeAccess and not e.(TypeAccess).getType() instanceof ErrorType
+ e instanceof TypeAccess
23
24
e instanceof ArrayTypeAccess
25
@@ -53,6 +53,7 @@ predicate isConstantExp(Expr e) {
53
from Expr e
54
where
55
isConstantExp(e) and
56
+ not e.(TypeAccess).getType() instanceof ErrorType and
57
exists(Expr child | e.getAChildExpr() = child |
58
not isConstantExp(child) and
59
not child instanceof Annotation
0 commit comments