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

No error message when reading from non-existant property in JS

    XMLWordPrintable

Details

    Description

      Reading a non-existant property in JS does not trigger an error.
      In contrast, writing to a non-existant property triggers an error like:
      "Error: Cannot assign to non-existent property "fooBar""

      Reading should trigger a similar error, as otherwise it is very easy to overlook coding errors.

      See attached QML file for a testcase.

      Tested with:
      qtbase: v5.0.0-299-g3d9a400
      qtjsbackend: v5.0.0-2-gce0de18
      qtdeclarative: v5.0.0-35-gd89f1db

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              tmcguire Thomas McGuire
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes