boolean (@NotNull PsiStatement switchStmt, OldSwitchStatementBranch branch, PsiLocalVariable variable) { return !PsiTreeUtil.isAncestor(switchStmt, variable, false) || ContainerUtil.or(branch.getStatements(), stmt -> PsiTreeUtil.isAncestor(stmt, variable, false)); }