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

qmllint: invalid property in javascript not checked for known type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.11
    • 6.9.3, 6.10.0
    • QML: Tooling

      With foo having a known type Rectangle, qmllint should detect the invalid property.

      The AOT compiler stats and the quick compiler (in strict mode) do.

      // pragma Strict
      
      import QtQuick
      
      Window {  
        id: root
      
        width: 640
        height: 480
        visible: true
      
        Rectangle {
          id: foo
          width: 100
          height: 100
          color: "red"
      
          Component.onCompleted: {
            foo.color = "blue";
            foo.bar = 42; // [1] runtime error/aot compilation stats info only, except when compiled with Strict
          }
        }
      }
      

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

            qtqmlteam Qt Qml Team User
            njeisecke_qtc Nils Jeisecke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes