-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.9
-
None
-
86017b85c (dev), 8ea32b9d5 (6.9), e5cef4464 (tqtc/lts-6.8)
Consider the following QML code:
import QtQuick Item { function bla() { for (let i = 0, j = 1; i < j; ++i) {} } }
Formatting it with 'qmlformat -i foo.qml' fails with
qt.qmldom.writeOut: writeOut of /home/nico/foo.qml created invalid code:
----------
import QtQuick
Item {
function bla() {
for (let i = 0j = 1; i < j; ++i) {}
}
}
----------
/home/nico/foo.qml:5:23: [Dom][QmlFile][Parsing] Error: Expected token `;' for .currentItem
qt.qmldom.writeOut: failure reformatting "foo.qml"
Error while writing