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

qml: destructuring in for-loop removes the variable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 17.0.0
    • Editors
    • None
    • Linux/X11

      When I type the following code in a QML file:

          for (const [note, velocity] of midiInput) {
            arr[note % 12] += 0.5 * velocity
          }
      

      and reformat the code, the part: [note, velocity] disappears (which obviously breaks my code).
      This was already an issue in QtC 16

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

            davschul David Schulz
            jcelerier Jean-Michaƫl Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes