From fe6a63aa47fb4253cffa0693514f2411ba49348a Mon Sep 17 00:00:00 2001 From: tdurieux Date: Tue, 7 Mar 2017 13:22:34 +0100 Subject: [PATCH] fixed files form Closure #42 --- .../42/com/google/javascript/jscomp/parsing/IRFactory.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/Closure/42/com/google/javascript/jscomp/parsing/IRFactory.java b/projects/Closure/42/com/google/javascript/jscomp/parsing/IRFactory.java index 1a95aa2..c6b70c5 100644 --- a/projects/Closure/42/com/google/javascript/jscomp/parsing/IRFactory.java +++ b/projects/Closure/42/com/google/javascript/jscomp/parsing/IRFactory.java @@ -565,8 +565,15 @@ Node processExpressionStatement(ExpressionStatement statementNode) { @Override Node processForInLoop(ForInLoop loopNode) { + if (loopNode.isForEach()) { + errorReporter.error( + "unsupported language extension: for each", + sourceName, + loopNode.getLineno(), "", 0); // Return the bare minimum to put the AST in a valid state. + return newNode(Token.EXPR_RESULT, Node.newNumber(0)); + } return newNode( Token.FOR, transform(loopNode.getIterator()),