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

Skip to content

Commit 5b734fe

Browse files
committed
Pretty-print AST: handle instanceof with record pattern
1 parent f037030 commit 5b734fe

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,12 @@ private class PpInstanceOfExpr extends PpAst, InstanceOfExpr {
385385
or
386386
i = 3 and result = " " and this.isPattern()
387387
or
388-
i = 4 and result = this.getLocalVariableDeclExpr().getName()
388+
i = 4 and
389+
(
390+
result = this.getPattern().asBindingPattern().getName()
391+
or
392+
result = this.getPattern().asRecordPattern().toString()
393+
)
389394
}
390395

391396
override PpAst getChild(int i) {

0 commit comments

Comments
 (0)