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

Self-referential properties should perhaps error, or at least warn

    XMLWordPrintable

Details

    Description

      import QtQuick 2.6
      
      Item {
          property bool test: test
      }
      
      

      This code runs without errors, which seems a little bad. It's very easy to make a mistake like this (in a more complex setting) with copy/paste mistakes, or ID usage, or similar.

      I think that any property that refers to its own value is probably rather suspect, and potentially an error.

      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
            w00t Robin Burchell
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes