Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.3, 6.3.0 Alpha, 6.3, 6.2
-
6.2.2, 6.3
-
None
-
7d911956b9074184898c26c12f1280a98eadfc04 (qt/qtdeclarative/dev) 298ffa496d32eeaf997b65d89a389115edbf0e0e (qt/qtdeclarative/6.2)
Description
import QtQuick Item { objectName: "id" id: a Item { id: b objectName: "b" } Component { id: handle Item { property Item a: Item { objectName: "property" } objectName: a.objectName Component.onCompleted: console.log(objectName, a.objectName, b.objectName) } } Component.onCompleted: handle.createObject() }
Should print "qml: property property b". Instead it crashes. qmlsc fails in two related ways here:
- The ID 'a' is preferred over the property 'a'. It should be the other way around
- When looking up the ID 'a' (or 'b' for that matter), it only looks in the context hierarchy of the inner Component. There, it doesn't find it and crashes.