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

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

XMLWordPrintable

      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

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

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

              Created:
              Updated:

                There are no open Gerrit changes