public void visitForLoop(ForStatement forLoop) {
   pushState();
   forLoop.setVariableScope(currentScope);
   Parameter p = forLoop.getVariable();
   p.setInStaticContext(currentScope.isInStaticContext());
   if (p != ForStatement.FOR_LOOP_DUMMY) declare(p, forLoop);
   super.visitForLoop(forLoop);
   popState();
 }
 @Override
 public void visitForLoop(final ForStatement forLoop) {
   super.visitForLoop(forLoop);
   Expression collectionExpression = forLoop.getCollectionExpression();
   if (!(collectionExpression instanceof ClosureListExpression)) {
     final ClassNode collectionType = getType(forLoop.getCollectionExpression());
     ClassNode componentType = inferLoopElementType(collectionType);
     forLoop.getVariable().setType(componentType);
     forLoop.getVariable().setOriginType(componentType);
   }
 }
 public void visitForLoop(ForStatement forLoop) {
   forLoop.getCollectionExpression().visit(this);
   forLoop.getLoopBlock().visit(this);
 }