Skip to content

Commit c0874ab

Browse files
committed
Fix pattern-case variable pretty-printer
1 parent f668110 commit c0874ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/lib/semmle/code/java/Expr.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ class LocalVariableDeclExpr extends Expr, @localvariabledeclexpr {
16841684
exists(InstanceOfExpr ioe | this.getParent() = ioe | result.isNthChildOf(ioe, 1))
16851685
or
16861686
exists(PatternCase pc, int index, int typeAccessIdx | this.isNthChildOf(pc, index) |
1687-
(if index = 0 then typeAccessIdx = -4 else typeAccessIdx = (-3 - index)) and
1687+
(if index = 0 then typeAccessIdx = -2 else typeAccessIdx = (-3 - index)) and
16881688
result.isNthChildOf(pc, typeAccessIdx)
16891689
)
16901690
or

0 commit comments

Comments
 (0)