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

instance structured value type by code blocks cannot be compiled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.7.0
    • 6.5.5
    • QML: Compiler
    • None
    • ca27c051ab52b764df8c8aab9c33211cbf94eba1

    Description


      it will give an error like the one below when enabling qmllint cmake target

      Warning: Main.qml:11:29: Could not compile binding for ii: Cannot generate efficient code for DefineObjectLiteral [compiler]
      

      and if using the below syntax will gives another error

      Warning: Main.qml:11:29: Cannot assign literal of type double to MyNamespace::MyFloat [incompatible-type]
              property myFloat f: 123.456
                                  ^^^^^^^
      

      please see the attached demo.

      6.6.3 works but 6.5.5 won't, is this a known limitation?

      Attachments

        1. image-2024-04-02-12-45-46-664.png
          image-2024-04-02-12-45-46-664.png
          323 kB
        2. screenshot-1.png
          screenshot-1.png
          293 kB
        3. testqmllint.zip
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            jiu shanheng jiu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes