Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
5.15.2, 5.15
-
None
Description
A simple application like this:
import QtQuick 2.15 import QtQuick.Window 2.15 Window { width: 640; height: 480; visible: true title: qsTr("Inline component problem") component TestComponent : MouseArea { onClicked: { const testVar = 1 // let testVar = 2 } } TestComponent { anchors.fill: parent } }
gives an error when the application starts (not even on a click action):
QQmlApplicationEngine failed to load component qrc:/main.qml:10:13: Identifier testVar has already been declared
Both const and let trigger the same error, while var seems to work.