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

            Assignee:
            qtqmlteam Qt Qml Team User
            Reporter:
            w00t Robin Burchell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes