Support codegen of empty for-loop

#KT-3009 Fixed
 EA-35742 fixed
This commit is contained in:
Alexander Udalov
2013-12-02 20:53:50 +04:00
parent 61ff9eb45b
commit 4aa6a42483
3 changed files with 24 additions and 1 deletions
@@ -652,7 +652,10 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
protected abstract void increment(@NotNull Label loopExit);
public void body() {
gen(forExpression.getBody(), Type.VOID_TYPE);
JetExpression body = forExpression.getBody();
if (body != null) {
gen(body, Type.VOID_TYPE);
}
}
private void scheduleLeaveVariable(Runnable runnable) {