Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-14430

Shell in interactive mode does not wait for for-loop body

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial - P5
    • Resolution: Unresolved
    • Affects Version/s: 2.6.3
    • Fix Version/s: Backlog
    • Component/s: Shell
    • Labels:
    • Operating System:
      ALL

      Description

      If the shell is in interactive mode, writing

      for (var i = 0; i < 10; i++)

      will prematurely send the line to V8 for execution, which then returns

      SyntaxError: Unexpected end of input

      because of the missing body.

      However, if one writes

      for (var i = 0; i < 10; i++) {    // notice open { at end

      it will correctly prompt for the body of the loop.

      The shell should detect the missing body and also wait for the next statement.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: