Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a06ac42

Browse files
committed
PrintAst: report pattern-cases similar to pattern-instanceof
1 parent b6622d2 commit a06ac42

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ private class SingleLocalVarDeclParent extends ExprOrStmt {
423423
SingleLocalVarDeclParent() {
424424
this instanceof EnhancedForStmt or
425425
this instanceof CatchClause or
426-
this.(InstanceOfExpr).isPattern()
426+
this.(InstanceOfExpr).isPattern() or
427+
this instanceof PatternCase
427428
}
428429

429430
/** Gets the variable declaration that this element contains */

0 commit comments

Comments
 (0)