PrintAst: report pattern-cases similar to pattern-instanceof

This commit is contained in:
Chris Smowton
2023-10-26 15:41:43 +01:00
parent b6622d2f5b
commit a06ac42512

View File

@@ -423,7 +423,8 @@ private class SingleLocalVarDeclParent extends ExprOrStmt {
SingleLocalVarDeclParent() {
this instanceof EnhancedForStmt or
this instanceof CatchClause or
this.(InstanceOfExpr).isPattern()
this.(InstanceOfExpr).isPattern() or
this instanceof PatternCase
}
/** Gets the variable declaration that this element contains */