boolean (GrStatement statement, Collection<GrStatement> returnStatements) { if (statement instanceof GrReturnStatement) return true; if (statement instanceof GrIfStatement) { boolean checked = GroovyInlineMethodUtil.checkTailIfStatement(((GrIfStatement)statement), returnStatements); return checked && returnStatements.isEmpty(); } if (statement instanceof GrExpression) { return returnStatements.contains(statement); } return false; }