Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
1 import QtQuick
2
3 Item {
4 id: root
5 PropertyChanges {
6 root.whatever: 1
^^^^
7 }
8 }
The highlighted scope has scope type GroupedPropertyScope.
Its base type is the component with id root at 3:1.
The grouped property here isn't a type but a 'reference' to a type. Using its base type to hold the referenced type is somewhat confusing as then the meaning of the base type depends on the scope type and is implicit.
In the example code above, the referenced type is a parent of the grouped property. This led to a situation (QTBUG-137035) where when iterating child scopes and their base types we ended up in an infinite loop due to this cycle.
Maybe the referenced type should be stored separately from the base type field to avoid this confusion. Or maybe we should expose the same field through two different methods which would communicate the underlying assumption and assert on the scope type.