Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111827

Aliases in inline components are fundamentally broken

    XMLWordPrintable

Details

    Description

      Consider:

      import QtQml
      QtObject {
          component Test : QtObject {
              id: self
              property int i: 2 + 0
              property alias j: self.i
              property alias notJ: self.i
          }
          property Test test: Test {
              objectName: 'foo' + 'bar'
              notJ: 12
              j: 24 + 4
          }
          property int k: test.j
          Component.onCompleted: console.log(k)
      }
      

      This prints "12". It should print "28".

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            ulherman Ulf Hermann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes