Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.2, 6.1
Description
There seems to be an issue with inline components and the more recently supported JS declarations:
import QtQuick 2.15 Item { component Test: QtObject { function a() { var v = 1; console.log(v) } // works as expected function b() { let v = 1; console.log(v) } // Identifier v has already been declared function c() { const v = 1; console.log(v) } // Identifier v has already been declared } Test {id: t} Component.onCompleted: { t.a(); t.b(); t.c() } }
var is ok, but let and const result in a false positive parsing error, thus the qml code fails to load.