Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ggj][ast][engx] fix: validate non-null elements for ForStatement #461

Merged
merged 10 commits into from
Nov 7, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public abstract static class Builder {

public ForStatement build() {
ForStatement forStatement = autoBuild();
NodeValidator.checkNoNullElements(forStatement.body(), "body", "for-statement");
Preconditions.checkState(
forStatement.localVariableExpr().isDecl(),
"For-statement variable must be a declaration");
Expand Down