boolean (GrStatement statement) { final PsiElement parent = statement.getParent(); if (parent instanceof GrOpenBlock || parent instanceof GrCaseSection) { if (statement != ArrayUtil.getLastElement(((GrStatementOwner)parent).getStatements())) return false; PsiElement pparent = parent.getParent(); if (parent instanceof GrCaseSection && pparent instanceof GrSwitchElement) { return true; } if (pparent instanceof GrStatement) { return isCertainlyYieldStatement((GrStatement)pparent); } } return false; }