Move assertion out of if statement

This commit is contained in:
Alexey Sedunov
2013-04-12 20:42:29 +04:00
parent a778ce24e7
commit 216f865658
@@ -296,9 +296,7 @@ public class JetPsiFactory {
assert ifExpr.getCondition() != null;
assert ifExpr.getThen() != null;
if (elseExpr != null) {
assert ifExpr.getElse() != null;
}
assert elseExpr == null || ifExpr.getElse() != null;
ifExpr = (JetIfExpression)ifExpr.getCondition().replace(condition).getParent().getParent();
ifExpr = (JetIfExpression)ifExpr.getThen().replace(thenExpr).getParent().getParent();