Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27310

QMLJSEditor automatically changes loop type from `for...of` to `for...in`

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 7.0.0
    • Quick / QML Support
    • None
    • Ubuntu 20.04.3 LTS
    • Linux/X11

    Description

      When I'm trying to auto-format (ReformatFile) it changes loop type from `for...of` to `for...in` and it brakes the code.

      for (let item of [10, 20]) {
      }
      

      becomes:

      for (let item in [10, 20]) {
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            cocojambo Vitaliy S
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes