XMLWordPrintable

Details

    • 779f6cf08 (dev), 6ebcf7afa (6.6)

    Description

      Currently, JS functions that have multiple levels of scopes – and variables that are accessed across scopes – will likely be uncompilable.

       

      Code

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
      
          function foo(): void {
              let v1 = 1
              let v2 = 2
      
              if (true) {
                  v1 = v2
              }
          }
      }
      

       

      Compiler output

      Warning: Main.qml:13:4: Could not compile function foo: Instruction "generate_DeadTemporalZoneCheck" not implemented [compiler]
      			v1 = v2
      			^^
      

       

      Partial workaround
      For simple cases like the example above, removing the curly brackets around v1=v2 would do the trick

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes