boolean (PsiElement context) { if (context instanceof PsiBlockStatement blockStatement) { final PsiStatement lastStatement = ControlFlowUtils.getLastStatementInBlock(blockStatement.getCodeBlock()); return statementExits(lastStatement); } else { return statementExits(context); } }