Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.4.0, 6.4.1, 6.5
-
07d2a80d0 (dev), a521216b7 (6.5), 942a53490 (6.4)
Description
While working with MultiEffect example I came up with behavior change in Qt Quick engine. Simplified QML code here:
property var myItem: [] Component.onCompleted: { // This makes it work with Qt 6.4.0 & 6.4.1 //console.debug("hello"); myItem[0] = 10; // This makes it work also with Qt dev //console.debug("myItem" + myItem[0]); // This works //myItem.push(10); } Timer { interval: 1000 running: true onTriggered: { console.debug(myItem[0]); } }
With Qt 6.3 that prints "10" OK. With 6.4 it prints "undefined", unless you enable that first line. With dev, "undefined" unless you enable that second line.
Array push works, but isn't assigning with [] also OK in JavaScript?
I can workaround this but just interested to know if it is a bug or bad example / expected behavior...?
Attachments
Issue Links
- resulted in
-
QTBUG-109261 qmlsc dead code analysis is incomplete
- Closed